I have a simple query, would you recommend NixOS for a server that only really runs containers like Home assistant and Nextcloud? I also use cockpit for an overview of running containers and system metrics.
I run all my containers using podman, using systemd unit files will this still work as expected?
Homelab -
When you require specific metal configuration -
When you have purpose-specific usecase like k8s cluster in cloud - (generally purpose specific distros are better for this, I like bottlerocket for k8s)
this is seriously interesting, so I can convert my systemd unit files and add them to the configuration.nix. is that what you’ve done here? I don’t suppose if you know whether podman auto-update will still work if its done this way? this is one of the main benefits I like about podman and systemd unit files.
@gytis-ivaskevicius so this is entirely for my own use so , I guess its my Homelab although I don’t tinker that much as I have Nextcloud and Home assistant (and other containers) just how I want them.
currently I run this on a fedora server, but I would prefer to switch to an immutable OS ( not Fedora core) and the only other one I was considering was Opensuse MicroOS
currently I run this on a fedora server, but I would prefer to switch to an immutable OS ( not Fedora core) and the only other one I was considering was Opensuse MicroOS
Just my 2 cents: I was considering an immutable Linux (Kinoite in my case) for a server but ruled it out because system updates can require reboots. It’s very nice for a desktop, not so nice for a server. A quick look at the MicroOS docs suggests that it has the same issue.
NixOS otoh seems to never require reboots. I’m pretty new to it but it’s ability to change every aspect of the system without rebooting is just mind-boggling.
I have been running podman containers on top of nix-stable for several months now. Some tidbits I’ve learned:
I’ve had to go back to running containers as root, but using the user="1000:100" directive in the container nix description to drop back to user privileges. I don’t believe rootless podman is very well supported yet on Nix. I had a full rootless setup previously on MicroOS (for a short time), but noticed some instability and some other pain points (reboots being one).
If you need podman-python for any scripts, you have to build it yourself as it’s not included in the package repository. I use it for some backup scripts.
I’m not sure if the auto-update flag works, but you can try it. I manage my image builds and updates with ansible.
Updating podman versions with the 23.05 update was somewhat painful because I had to do the system updated, which failed, then do a podman system reset, then recreate all my volumes and restore from the zfs snapshot (yay!) that I made of that pool before the update.
Otherwise it’s been running great for several months now!
ah that’s a shame that rootless podman is not fully supported it’s one of the reasons I switched to podman, I take it this is only applicable when running podman containers using the nixos module ? but my understanding is that its not recommended to run containers manually with systemd unit files in /home like i currently do on fedora is that correct?
do you think this was just a caveat of 23.05 and that future updates might be less eventful ? I mean I backup my /home directory to a external drive regularly as this is where I have my config and mounts for my containers but this wouldn’t be ideal to have to restore from backup every nixos release.
I’m currently installing nixos on a spare laptop I use for tinkering, hopefully I can learn how to do things the nix way and see if auto-update works at the same time.