I never said NixOS is uniquely solving any problems. But - none of the other solutions are really quite the same or equivalent. In total, its unified approach is relatively unique.
I really don't see myself using another Linux distro. It would make more sense to just modify my NixOS config. Don't know what another distro would even buy me tbh.
A- If you want to be able to restore to any point after installing your system: LVM/ZFS/BTRFS snapshots got you covered.
B1- If you want to install your system the way you want, you have Kickstart (RedHat family) and Preseed (Debian family). You can provide an installation template to the installers, and they install your system the way you want.
You want to get your /etc/ afterwards the installation? Either provide it on a disk, or your local network, or anywhere on the internet. Either integrate it to your Kickstart/Preseed end hooks, or do it after your first boot.
B2- If you want something more fancy? Create a FAI installation media which installs the system you want.
C- You want to transform an existing Debian system to something you want? You get the dpkg package selection state and set to the target system, apply the state so the system is converted to your own selections. Apply the /etc via git or any way you want.
D- Want something more programmatic? Run an Ansible playbook locally (This is how GitLab installs and configures itself during install).
E- For fleet installations there are XCAT and network variants of B1, but they are out of scope for personal systems.
We use E in our system room. I used B1 for personal systems and B2 to deploy an installation country-wide via USB sticks. I used C in the same project for a small subset of servers. In these cases, all systems are operational in the first boot, starting from a known state.
I know a lot of people using A, and nudging me to try/use it. GitLab uses D every time I upgrade it.
Thanks for all the details. "A" can't really be checked into git due to size, and doesn't allow for forward config changes, just rollbacks. Do B1 or B2 allow updates to an existing system? C so far seems the closest to Nix, though it's missing the configuration side. I used D before and frankly Ansible is not great. It is meant to be idempotent but has so many holes that it never really is, and because it's a separate layer from the system itself, the scripts might not work after a system upgrade. With Nix, the config IS the system. E sounds interesting, never heard of it - sounds like you saying it's not suitable for personal use though for some reason.
Entire OS configured with code, which can be modular with imports and functions. Want to run a Postgres server? One-liner in your config. Want to advertise yourself over avahi? Same deal. Need custom udev rules? One-liner again.
I literally cannot bork my machine. I can always roll back. Useful when messing with low-level stuff like drivers.
I have full control and understanding of updates and the exact versions of all the programs I run. I can always read the source of any program I'm running by looking in the nix store.
Super easy to package new programs and contribute to nixpkgs.
Super easy to tweak packaging other provided without forking via overlays.
I share config across devices in a git repo, so provisioning a new machine is trivial. I got a desktop and I basically imported a bunch of common config along with like 10 lines of config specific to the desktop.
I'd say it's more like vim. Steep initial learning curve for a few months then it becomes pretty easy and indespensible. Perhaps Haskell is like this but I never got past the curve.
Are templated VMs contained within a few kilobytes of config files? Can anything in the entire system be included or excluding by tweaking these text files? Can it be used as a desktop on bare metal?
ZFS and BTRFS are orthogonal and often used in conjunction with Nix.
This person's main argument is that because Ansible can be used to accomplish some of the benefits (for some definition of accomplish) of NixOS, that NixOS isn't doing anything special or differentiating.
I also get a sense they are for some reason solely focused on cattle server use-cases. I'd say the OP (home infra) is in between your production servers and your PC.
I run my home infra as sort-of-cattle. Nothing that matters is stored solely on local disk. If my Mac were to die, I'd probably spend an hour or so waiting for Homebrew and asdf to install stuff, and I'd have to manually grab some files from GitHub. The worst case would be my Windows desktop dying, since I have nothing in the way of repeatability set up for, but all I use it for is Steam. Again, mostly just dealing with the annoyance of installing Windows and waiting for Steam to re-download a ton of games.
Conversely, I can lose a k8s node and have nothing change. If I lose my NAS (separate node, separate Proxmox cluster), I'd have to boot up the backup (which boots daily to sync, then shuts down) and run an Ansible play to change its IP address so that all the NFS targets still worked. I could make that more automated, I suppose, but it's an unlikely scenario so I'm fine with the small amount of manual labor.
I guess my point is that I don't see the benefit in having a special OS for daily use. If I want to fiddle around and possibly break things, I don't want to be doing that on the device I use daily. I used Gentoo for years in the early 2000s, and no longer have the time or patience for my main computer breaking constantly. If I want to play with something, I spin up a VM. If I want to play with something baremetal, I have an old Dell T310 I can use, and a couple of ancient Macbooks somewhere.
This is what I love about NixOS users - how belligerently defensive y'all get immediately when someone pokes at your project.
> Are templated VMs contained within a few kilobytes of confif [sic] files?
Not kilobytes, but Proxmox supports sparse images so pretty small. More importantly, disk space is cheap as hell, and I value my time way more than a couple of hundred megs of space.
> Can anything in the entire system be included or excluding by tweaking these text files?
Personally I template my images with Ansible, so yes in fact anything can be included or excluded with a text file.
> Can it be used as a desktop on bare metal?
Who cares? The performance hit from a modern Type 1 hypervisor is so small as to only matter if you're also the kind of person who is tweaking obscure CFLAGS for emerge, which is to say it doesn't matter.
> ZFS and BTRFS are orthogonal
Only in that they aren't an OS, obviously, but they perform the same function (rollback) that you mentioned as a positive point for NixOS.
> Who cares? The performance hit from a modern Type 1 hypervisor is so small as to only matter if you're also the kind of person who is tweaking obscure CFLAGS for emerge, which is to say it doesn't matter.
I want to use it as my personal computer...using a VM seems even more fringe and niche than NixOS there lol. And for a home network, VM also seems overkill.
I suppose there are also network effects at play. If you use NixOS for a laptop and desktop, suddenly using it for home infra is actually more economical than using other tools.
I literally cannot be paid to care about borking my machine. It takes ten minutes to reinstall.
For stuff that cannot conveniently be installed locally (hello multiple versions of DaVinci Resolve) or ideally want to be ephemeral (hello basically all the development environments I use), I've got Docker.
NixOS's virtualisation module can use either Docker or Podman and if Podman is enabled it has a Docker compatiblity mode (via `virtualisation.podman.dockerCompat = true`) that puts symlinks in all the right places (`docker` binary, `docker.sock`) so that software doesn't even know it's not running vanilla Docker :)
Really not seeing the point of using docker-anything on NixOS here. Shouldn’t Nix already be able to isolate dependency trees from each other? Why would you want to duplicate all those files yet again in a docker image?
Sounds good in theory but there are a couple reasons to use docker. The first is that there are endless packages already prepared for docker that you'd have to manually set up on any OS, let alone Nix. For instance "itzg/minecraft-server". The second is that if you use docker you've got control of where all the stateful volume data sits. I keep it all in one folder for easy backup. The rest of the system is fully managed by nix.