1 # Package Management {#sec-package-management}
3 This section describes how to add additional packages to your system.
4 NixOS has two distinct styles of package management:
6 - *Declarative*, where you declare what packages you want in your
7 `configuration.nix`. Every time you run `nixos-rebuild`, NixOS will
8 ensure that you get a consistent set of binaries corresponding to
11 - *Ad hoc*, where you install, upgrade and uninstall packages via the
12 `nix-env` command. This style allows mixing packages from different
13 Nixpkgs versions. It's the only choice for non-root users.
15 ```{=include=} sections
16 declarative-packages.section.md
17 ad-hoc-packages.section.md