Declarative Package Management
With declarative package management, you specify which packages you want on
your system by setting the option
. For instance, adding the
following line to configuration.nix enables the Mozilla
Thunderbird email application:
= [ pkgs.thunderbird ];
The effect of this specification is that the Thunderbird package from Nixpkgs
will be built or downloaded as part of the system when you run
nixos-rebuild switch.
You can get a list of the available packages as follows:
$ nix-env -qaP '*' --description
nixos.firefox firefox-23.0 Mozilla Firefox - the browser, reloaded
...
The first column in the output is the attribute name,
such as nixos.thunderbird. (The nixos
prefix allows distinguishing between different channels that you might have.)
To “uninstall” a package, simply remove it from
and run
nixos-rebuild switch.