this post was submitted on 14 Nov 2024
34 points (100.0% liked)

Nix / NixOS

1776 readers
1 users here now

Main links

Videos

founded 1 year ago
MODERATORS
 

I experimented with several ways to run my services:

  1. "regular" systemd services (services.glance = { ... };)
  2. nix containers (containers.glance = { ... };)
  3. podman containers (virtualisation.oci-containers.containers.glance = { ... })

and I must say I'm starting to appreciate the last option (the least nixos-y) more and more.

Specifically, I appreciate that:

  • I just have to learn the app/container configuration, instead of also backwards-translating from their config into the various nixos options (of course the .yaml or whatever configuration files are still generated from my nixos config, I just do that in a derivation instead on relying on a module doing it for me)
  • Services are sometimes outdated in nixpks (even in unstable - and juggling packages between stable and unstable is yet another complication)
  • I feel like it's more secure (very arguable and also of very little consequence since everything is on my homelab... it's mainly for the warm fuzzies)

Do you guys use one of the options above? Something different?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 12 points 1 week ago (1 children)

Plain old docker compose since it seems to come with by far the fewest surprises and is most widely supported.

Nearly every project of interest has a compose.yml available, which is hardly true for systemd services, nix services, or for podman/kubernetes.

I was using podman-compose briefly, but it is just different enough to break in unclear ways and I kept having to fight with it so I went back to docker docker to eliminate the headache.

[โ€“] verstra 3 points 1 week ago* (last edited 1 week ago)

This is the way. Docker (& compose) are not flawless, but they are predictable and useful enough for all my needs.

I currently have around 12 containers running on my server, all trough docker compose. Only thing I use nix for is providing tools & their configs. And also restic backups.