Your favorite intro/tutorial to Nix

Hi all!

I am interested in how people present, introduce or teach Nix to beginners.

Do you have a link you systematically send? A video?
What do you think is the number one thing you talk about to explain what Nix is and why it matters?
Which technical pieces do you feel are the most important to introduce first to make someone understand?

Please share your thoughts! :smiley:

I really like @ryan4yinā€™s https://nixos-and-flakes.thiscute.world/ as a cohesive, narrative-based introduction I wish existed when I started.

4 Likes

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

Iā€™d like to expand on my previous post and add two more videos I stumbled upon recently.

  • Although, as the title suggests, Everyday Use of GNU Guix (timestamp 21:36) by Chris Marusich on YouTube aims at explaining core Guix features, I also found it to be very useful in understanding Nix, since both are conceptually very similar. In particular, I found the following explanations helpful (timestamp 21:36 onwards): 1) the concept of building software as a function and 2) how exactly profiles and the symlinks to the Guix/Nix Store work (and their role as ā€œGC rootsā€ in garbage collection).
  • Nix/Guix and Reproducible Science by Konrad Hinsen for the Summer of Nix 2022 Public Lecture Series, where he explains why reproducibility/replicability are so important.
1 Like
5 Likes