A look at Nix and Guix
Nix and Guix are a pair of unusual package managers based on the idea of declarative configurations. Their associated Linux distributions — NixOS and the Guix System — take the idea further by allowing users to define a single centralized configuration describing the state of the entire system. Both have been previously mentioned on LWN, but not covered extensively. They offer different takes on the central idea of treating packages like immutable values.
In a normal Linux distribution, the set of packages, services, and configuration files installed on a system is built up over time using tools that do not inherently require knowledge of programming. This approach can be convenient, making it possible to simply install a missing package and then have access to it going forward. The downside of this approach is how difficult it makes reconstructing a new system with the same set of tools, services, and tweaks when it comes time to migrate to a new host. The majority of Linux distributions lack any kind of centralized record of why each package was installed or each configuration option was changed.
NixOS and Guix offer an alternative: specify your setup with a programmable configuration file, and then let the package manager arrange for the software available on the system to reflect that. These configurations can include comments, version control, and the ability to factor out common parts for different machines, making it much easier to keep track of why something was configured or installed.