The nix ecosystem is unfortunately somewhat lacking in good documentation, but there are still some good resources:
- The NixOS website has a nix language basics guide, which is good for getting you initially oriented.
- The Nix Manual is a good reference for the syntax and builtins of the nix language.
-
The Nixpkgs Manual is a good reference for the various helper functions provided by nixpkgs, such as
stdenv.mkDerivationwhich I used here. -
The NixOS Manual is a good reference for the nix code that makes NixOS work, such as the module system which processes
configuration.nix. - The Nix Pills are a good deep-dive into how nix is working underneath, and how and why some of the helper functions in nixpkgs were created.
There are further guides and other resources listed on the NixOS website.