2021-09-08 09:47:38 +02:00
|
|
|
# Package Management {#sec-package-management}
|
|
|
|
|
|
|
|
This section describes how to add additional packages to your system.
|
|
|
|
NixOS has two distinct styles of package management:
|
|
|
|
|
|
|
|
- *Declarative*, where you declare what packages you want in your
|
|
|
|
`configuration.nix`. Every time you run `nixos-rebuild`, NixOS will
|
|
|
|
ensure that you get a consistent set of binaries corresponding to
|
|
|
|
your specification.
|
|
|
|
|
|
|
|
- *Ad hoc*, where you install, upgrade and uninstall packages via the
|
|
|
|
`nix-env` command. This style allows mixing packages from different
|
|
|
|
Nixpkgs versions. It's the only choice for non-root users.
|
|
|
|
|
2023-02-11 08:48:06 +01:00
|
|
|
```{=include=} sections
|
|
|
|
declarative-packages.section.md
|
|
|
|
ad-hoc-packages.section.md
|
2021-09-08 09:47:38 +02:00
|
|
|
```
|