Installation

Follow the official installation instructions for your system.

Once that is done you should be able to run:

$ nix --version
nix (Nix) 2.26.2

In order to use the latest features you will need to add this line to ~/.config/nix/nix.conf:

~/.config/nix/nix.conf
experimental-features = nix-command flakes

Nomenclature

A confusing thing early on can be understanding exactly what Nix is and isn’t. Nix plays different roles for different people, but since this site will primarily be drawing on my own journey learning how to use nix I’ll be focusing on two use-cases primarily:

  • Using nix in a project setting, to manage dependencies across dev and CI environments
  • Using nix as a replacement for homebrew on MacOS

I won’t cover using NixOS, since I have never done that! And while there are many valid ways to work with nix, I’ll be focusing on the latest version (using flakes and profiles) to keep things simple (or at least, simpler).

Helpful Links

  • Docs: While I will do my best to bring my own lens to learning nix, by far the most detailed information will be in the official docs.
  • Glossary: The official glossary.
  • Explainix: Interactive nix language annotations, very slick and also useful!
  • Official Nix Learn Site
  • How to Learn Nix: In-depth notes from 2021.
  • Awesome nix: a link in a list to a list of links.