Discover more from Matt Rickard
Why Is NixOS Popular Again?
There's been a renewed interest in NixOS, and its package manager, nixpkgs. The key feature of Nix is declarative configuration – the Linux-based operating system is defined by a set of declarative packages built by the Nix package manager, nixpkgs. It was originally released in 2003 but lately has been seeing renewed interest: a more formal team structure around development (link), new startups built around Nix, 30% YoY user growth (link), and exponential growth in GitHub stars.
Is NixOS gaining rapid adoption, or is it just hype?
My interest in Nix came during the mid-2010s when I looked at it as a model to solve to the difficulty of installing and configuring packages inside Docker containers. There were a few attempts at making a container-native OS (notably, CoreOS), but neither those operating systems nor NixOS ultimately stuck.
There's been a few notable startups using Nix, but otherwise, I haven't seen much adoption in the wild. Replit uses Nix to decrease startup times for REPLs (which comes mostly from installing packages). Cardano, the blockchain, uses Nix to configure nodes.
Nixpkgs still struggles with two major issues: (1) all package configuration must be written in the Nix expression language, which is notoriously tricky to use (2) patching or pinning old packages is much harder than it should be – for both developers and package maintainers.
Consumer OSes rarely need to be fully declarative – if for development, why not use semi-declarative solutions like Docker or a virtual machine (or WSL)?
Is it for ephemeral servers? Is there a market for that? Nix doesn't provide real isolation, so it doesn't add a security model to the OS layer.
Can you separate the package management from the operating system? Can you take the principles of nixpkgs and implement them without Nix expression language? Is it Nix anymore?
A package manager needs to solve for the supply side – how do you get maintainers to write configuration and update in a timely way?