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