at 18.09-beta 1.2 kB view raw
1<chapter xmlns="http://docbook.org/ns/docbook" 2 xmlns:xlink="http://www.w3.org/1999/xlink" 3 xmlns:xi="http://www.w3.org/2001/XInclude" 4 version="5.0" 5 xml:id="sec-package-management"> 6 <title>Package Management</title> 7 <para> 8 This section describes how to add additional packages to your system. NixOS 9 has two distinct styles of package management: 10 <itemizedlist> 11 <listitem> 12 <para> 13 <emphasis>Declarative</emphasis>, where you declare what packages you want 14 in your <filename>configuration.nix</filename>. Every time you run 15 <command>nixos-rebuild</command>, NixOS will ensure that you get a 16 consistent set of binaries corresponding to your specification. 17 </para> 18 </listitem> 19 <listitem> 20 <para> 21 <emphasis>Ad hoc</emphasis>, where you install, upgrade and uninstall 22 packages via the <command>nix-env</command> command. This style allows 23 mixing packages from different Nixpkgs versions. It’s the only choice 24 for non-root users. 25 </para> 26 </listitem> 27 </itemizedlist> 28 </para> 29 <xi:include href="declarative-packages.xml" /> 30 <xi:include href="ad-hoc-packages.xml" /> 31</chapter>