this post was submitted on 04 Jul 2024
5 points (100.0% liked)

Nix / NixOS

1782 readers
1 users here now

Main links

Videos

founded 1 year ago
MODERATORS
 

If given the option, which route do you go? I have services running in both, and I'll often just do whats easier. I dont really notice a different in performance the configuration for containers is simple enough I don't mind it.

I also wish there was a nix function that parsed a docker compose and used it for the oci-container config. Then I could use my existing compose files or the ones I find in docs online.

top 2 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 1 points 4 months ago (1 children)

I'm about to start my endeavour into docker containers on nix since there isn't a module for the service I want.

How do you do docker containers on nix? My early reading suggests oci-containers

[โ€“] [email protected] 1 points 4 months ago

Yes. Oci-containers is similar to how you would setup a docker compose. Its not quite one to one. In particular, networks are odd, since you have to hand write a systemd service to create it? But thats only if you want isolated networks. You can find some examples on my github, I use it for most of my services. Heres an example of nocodb with backing postgres database. Its pretty simple: https://github.com/rutrum/dots/blob/master/hosts/modules/nocodb.nix let me know if you have questions in the future