Nix Language / Development
Jumping straight in will cause frustration. Conversely, investing even one hour into understanding the language will give you a good starting point.
By my own estimate, a week's semi-casual use and you will understand most concepts, even if you still make plenty of small syntax errors.
Learning Nix (the language)
- Nix.dev's language tutorial
- A really great introduction - play along in your own REPL (
nix repl
)!
- A really great introduction - play along in your own REPL (
- Nix Reference Manual - Nix Language Section
- Less comprehensive, less nice - but its overview introduces most of the language terminology
- Learn X in Y Minutes: Nix
- A whirl-wind tour of the Nix language and a few builtin functions
- A tour of Nix
- A series of small exercises designed to teach you Nix on the way.
Of these, I've mostly stuck to Nix.dev's excellent tutorial, but do what suits you.
Learning by example
As you progress, try to read how various packages on nixpkg
are actually
being built. This is a helpful way to gauge your confidence with the language
itself and the most common functions.
Go to NixOS Package Search and search for packages that interest you or use similar build systems and ecosystems to software you intend to package.