Explaining Nix to people who use Nix is difficult. Untangling nixlang, cppnix, the nix daemon, nixpkgs, nixos is a project in itself. Explaining Nix to a regular programmer who’s never heard of it even more so. And I don’t even know where to start with non-programmers.
People want to know about my work, and I’m usually good at explaining things to various audiences, but I struggle so hard with Nix. I tried again today and came up with
Nix allows programmers to take what is usually a series of manual steps (installing software, configuring applications and the operating system), and automate those processes in a way that is easy to compose and transfer between computers.
Which is just… a generic description of programming?
So how do you explain Nix to the laypeople in your life?
Well yeah, it’s taking a process that’s normally manual and programming it. Nix packages software, NixOS deploys it.
I doubt “automating software configuration” (or “correct deployment” as the thesis puts it) is interesting to people outside of tech, but that’s really it.
In my experience, when explaining something highly technical like Nix, it is better to not try to explain it, but instead describe the benefits from using it.
Without even using “reproducible” or “repeatable” or even “composable” which are buzzwords we know and love, I think focusing on the social aspect is the most important part:
You can take a configuration or environment from someone who’s more of an expert in something than you are and get the same result they did because they wrote it down for you. Nix does this for software builds, NixOS extends this to the whole operating system, encoding decades of sysadmin wisdom in one place to deploy everything from servers to smart devices.
That’s the real benefit, I think: I’ve personally learned more from reading nixpkgs about Linux deployment than I have from any other source, and you don’t even need to understand all of it to use it.
Everything needed to build exactly the same thing is, or at least can be, specified in one place. Even when “the thing” is something as complicated as a whole OS install or the like. That’s about as much as I think you can truly explain to a layperson.
For a complete layperson I doubt you’ll get far without a simile. Here’s one I just thought up:
Explain software builds like building a chair; the code is a blueprint to produce some kind of artifact - In a traditional setting some human needs to come around and saw chair legs and a seat; this takes some training and effort, and even a highly skilled human will struggle to reliably produce exactly the same chair.
Even if they do their job perfectly with a great, clear blueprint and excellent tools, the wood will be different, or maybe the air moisture content is different and a certain chair is more likely to grow moldy than a previous one. Worse, a wood supplier might try to sabotage you if a competitor pays them to do so.
On the other hand, if you had a factory that magically controls the environment perfectly, can perfectly scan the wood to ensure it is always of the same quality, and has magical machines that can cut and construct the chair pieces perfectly, you could be pretty confident that all chairs you produce are the same. Once the factory is built, it’s also automatic and takes effort away from the humans who would otherwise need to saw chair pieces; they can instead focus on designing blueprints for better chairs.
Nix is like this factory, but for code. NixOS is a way to make this factory also automatically deliver and place these chairs in people’s homes according to their instructions, with the same precision the chair factory provides - it builds the delivery vehicles and all from scratch in magical factories.
Exactly. Nix is essentially about dataflow programming with files. Everything else is historically grown implementation details.
For laypeople, if they understand why programming as automating repetitive tasks makes sense, one has to explain why manipulating files manually at the scale of today‘s software ecosystem doesn’t work any more.
To people who have not on their own even perform a multi-step installation process, maybe you don’t explain Nix. It’s a thing to make complex installation better, but even complex installation is something without an association, so…
To power-user laypeople, you can say that Nix is a tool to make sure that installation instructions are complete, to make them automatable, and to remove the issue of version conflicts.