at 16.09-beta 1.1 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 7<title>Package Management</title> 8 9<para>This section describes how to add additional packages to your 10system. NixOS has two distinct styles of package management: 11 12<itemizedlist> 13 14 <listitem><para><emphasis>Declarative</emphasis>, where you declare 15 what packages you want in your 16 <filename>configuration.nix</filename>. Every time you run 17 <command>nixos-rebuild</command>, NixOS will ensure that you get a 18 consistent set of binaries corresponding to your 19 specification.</para></listitem> 20 21 <listitem><para><emphasis>Ad hoc</emphasis>, where you install, 22 upgrade and uninstall packages via the <command>nix-env</command> 23 command. This style allows mixing packages from different Nixpkgs 24 versions. It’s the only choice for non-root 25 users.</para></listitem> 26 27</itemizedlist> 28 29</para> 30 31<xi:include href="declarative-packages.xml" /> 32<xi:include href="ad-hoc-packages.xml" /> 33 34</chapter>