1# Declarative Package Management {#sec-declarative-package-mgmt} 2 3With declarative package management, you specify which packages you want 4on your system by setting the option 5[](#opt-environment.systemPackages). For instance, adding the 6following line to `configuration.nix` enables the Mozilla Thunderbird 7email application: 8 9```nix 10{ 11 environment.systemPackages = [ pkgs.thunderbird ]; 12} 13``` 14 15The effect of this specification is that the Thunderbird package from 16Nixpkgs will be built or downloaded as part of the system when you run 17`nixos-rebuild switch`. 18 19::: {.note} 20Some packages require additional global configuration such as D-Bus or 21systemd service registration so adding them to 22[](#opt-environment.systemPackages) might not be sufficient. You are 23advised to check the [list of options](#ch-options) whether a NixOS 24module for the package does not exist. 25::: 26 27You can get a list of the available packages as follows: 28 29```ShellSession 30$ nix-env -qaP '*' --description 31nixos.firefox firefox-23.0 Mozilla Firefox - the browser, reloaded 32... 33``` 34 35The first column in the output is the *attribute name*, such as 36`nixos.thunderbird`. 37 38Note: the `nixos` prefix tells us that we want to get the package from 39the `nixos` channel and works only in CLI tools. In declarative 40configuration use `pkgs` prefix (variable). 41 42To "uninstall" a package, remove it from 43[](#opt-environment.systemPackages) and run `nixos-rebuild switch`. 44 45```{=include=} sections 46customizing-packages.section.md 47adding-custom-packages.section.md 48```