Market nix not as a package manager but as a build tool and dependency management tool

It takes a bit more time than an elevator pitch, but my introduction so far seemed convincing. Nix does exactly two things:

  1. Nail down the contents of files and references between them, such that when you need to move around the entire collection, you always get exactly that, regardless where you place it
  2. Run executables in isolation, such that they can only access these nailed-down files, and itself will produce only nailed-down files.

The Nix language is just there to orchestrate that, and despite all its quirks, it’s quite useful because it has file system paths and string interpolation as first class citizens, and it turns out that this matches exactly the Unix idea where everything is a text file.

So whenever you want to create new files from a bunch of existing files, consider using Nix, because they will never fall apart, and you’ll be able to run executables among those files in exactly the same manner after any period of time has passed, on any machine with a matching architecture. (Then comes a list of typical use cases, such as your thesis where you build a PDF or website from a bunch of files, or an entire operating system, which is also just a bunch of files.)

6 Likes