I've been following the Nix project for a while but now that I'm
done with my PhD I finally have some free time and energy to try
using it in earnest. This series is going to be me learning Nix by
showing you how things work and how to put the pieces together.
For those of you unaware, Nix takes reproducible builds to their
logical conclusion by making package builds (mostly) pure functions
of their dependencies. The binary artifacts of builds are stored in
a content-addressed store (the Nix store) so you can be sure that
you're always getting the same package if you have its name and
hash. Not only can you build programs this way, but you can also
build development environments ("I want these libraries available in
my build environment and nothing else", for example), run commands
in throw-away environments with specific packages installed without
polluting your global environment. There's even an operating system,
NixOS, based on this packaging system that allows you to configure
your whole system (installed packages, system settings, etc) from a
single file.