One of the first types of Nix expression one encounters when learning how to use the Nix package manager is default.nix
; on the wonderful NixOS IRC channel I learned of the existence of shell.nix
and release.nix
as well.
I got the impression that - roughly -default.nix
is to be used with nix-build
for simply building the package, shell.nix
is used with nix-shell
to create an interactive environment with the package and release.nix
is used with nixops
in deploying the package.
Since this is likely incomplete and partially incorrect, and since this does not seem to be clearly documented, I would like a clear and precise explanation of these sorts of "standard files"; in particular, for each of these file types (as well as any other standard files I am missing), I would like to know:
As an additional bonus question, I want to know which - if any - of these standard files should be used when installing a package into a NixOS module? How would that be done?