In February, I got a new laptop for home use and installed NixOS on it. This was the first time I have ever used NixOS. In this post, I’ll share some thoughts about how it has worked for me.
The laptop is a second-hand ThinkPad X250. Installing NixOS was pretty straightforward and I haven’t had any trouble the hardware compatibility.
Good. Configuring your system with a centralized configuration file is a pleasure. It offers a unified way to configure everything and a short config goes a long way. If you like Infrastructure as Code, you will like this. You can see my configuration.nix here.
Another great feature is that you can roll upgrades and configuration changes
back. Just today I upgraded my packages (nixos-rebuild switch --upgrade
),
rebooted the laptop, and the system didn’t come up anymore. It got stuck
waiting for udev, whatever that means. I rebooted the system again, selected the
previous generation from the boot menu, and the system started again. I will
have to face the broken udev eventually – hopefully a later upgrade will fix it
– but at least the system works for now.
Bad. Let’s face it: Nix and NixOS are doing their own thing. Your skills with other Linux distros won’t directly transfer. You will be tempted to say “eh, I’ll just edit this file and run this command” and you will be frustrated when you can’t find those files and those commands do not work. Learning to operate the system and make your own packages takes a while.
Since I’m mostly using this laptop for writing and surfing the web, I have not bothered to learn much. I did manage to package and install git-cal with Nix, but have not looked into how to make that package available for others. Should I contribute it to the main nixpkgs repo? I don’t know.
Ugly. The tooling does not put much emphasis on the versions of packages. You’ll get a package, sure, but whatever is the version is secondary. If I was using NixOS for development, I’d like to pin the versions of the tools I’m using like I pin the versions of the libraries. Apparently the upcoming Nix Flakes feature offers a decent solution, but I was suprised that this wasn’t a solved problem.
Overall, Nix and NixOS remind me of Clojure: they’re powerful, they do things differently from what you’re used to, and learning them is… complicated. I’ll leave it for another time to debate whether it is worth it.