Your favorite intro/tutorial to Nix

I started using NixOS as the sole operating system on my desktop PC about two months ago, so I’m a newbie with only rudimentary knowledge of the inner workings of Nix. I’m just an “average joe” user with no background in software development or system administration. I do have a background in Mathematics though, and that’s probably one of the reasons I like the unique functional, declarative and reproducible approach Nix takes. Let me share what helped me gain a basic first foothold in the NixOS world.

My mental concept of what Nix does (and how) is based on an analogy: for me, Nix is like cooking/baking. What do I mean by that? Well, I declare “I want a cheesecake” (a Nix expression) and Nix creates the shopping list as well as the recipe (the derivation) and then realizes that for me. Even if you enjoy baking, telling someone else that you want a cake is much simpler than doing it yourself (including buying the ingredients first). You don’t even need to know how to do it yourself. Expressing your will is enough. Nix is the same, you declare what you want and the system takes care of the rest. I like that! And I like the idea that my whole system is the result of a function that takes my needs as an argument.

The following is a selection of resources that helped me to understand and appreciate better what Nix is and does (in no particular order):

4 Likes