about summary refs log tree commit diff
path: root/nixpkgs/nixos/doc/manual/configuration/package-mgmt.chapter.md
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/doc/manual/configuration/package-mgmt.chapter.md')
-rw-r--r--nixpkgs/nixos/doc/manual/configuration/package-mgmt.chapter.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/nixpkgs/nixos/doc/manual/configuration/package-mgmt.chapter.md b/nixpkgs/nixos/doc/manual/configuration/package-mgmt.chapter.md
new file mode 100644
index 000000000000..1148bbe84740
--- /dev/null
+++ b/nixpkgs/nixos/doc/manual/configuration/package-mgmt.chapter.md
@@ -0,0 +1,18 @@
+# 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.
+
+```{=include=} sections
+declarative-packages.section.md
+ad-hoc-packages.section.md
+```