Some notes on nix flakes

Some notes on nix flakes

Julia Evans

a few people in the replies are asking why someone might want to use nix as an OS / to manage your python packages / to manage your config files.

does anyone want to share their reasons for doing those things? I don't really know.

(please give examples of some specific problems Nix solves for you and what you like about it, don't just say "it's reproducible/declarative” :) )

@b0rk I have ADHD and have maintained a weird soup of internet-hosted stuff served from a VPS for decades at this point.

What used to happen before I switched to Nix is that, when I needed to upgrade, I would spin up a new VPS, half-migrate to it, and then never finish, leaving a few things running on the old machine. In the process I'd constantly find I'd forgetten custom configuration tweaks in dusty subdirectories of /etc and end up leaving things half-broken for months before I caught it.

@b0rk Eventually it hit a point where my oldest VPS was running a version of Debian that was so out of date that I _couldn't SSH into it_. I spent two very intense weeks finally migrating everything to NixOS.

NixOS allows me to keep _all_ of my server's configuration in one place. I can easily rebuild my server from scratch. I have a VirtualBox VM that I can test upgrades out on before I push them to the real server, and I can have real confidence that if it works there, it'll work for real.

@b0rk That said, I've also found working with Nix to be very challenging - especially troubleshooting problems. I just went through days of frustration because a typo resulted in infinite recursion rather than a "this name is undefined" error. The undefined name didn't even show up in the stack trace, that I could see. Anything _not_ in nixpkgs has been unpleasant to deal with. I have no interest whatsoever in running it on my desktop.
@SpindleyQ thanks, this is very relatable