summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2015-02-15 18:29:52 +0100
committerDomen Kožar <domen@dev.si>2015-02-15 18:29:52 +0100
commit934f97281f19b79642eeea11454d853229dc8c58 (patch)
tree5fc0beb365273cd0f47063f91622fdc12f8d8b3d /doc
parentef8aaa5571b572a3bc0d45cbef6ee5e8a828e700 (diff)
downloadnixpkgs-934f97281f19b79642eeea11454d853229dc8c58.tar
nixpkgs-934f97281f19b79642eeea11454d853229dc8c58.tar.gz
nixpkgs-934f97281f19b79642eeea11454d853229dc8c58.tar.bz2
nixpkgs-934f97281f19b79642eeea11454d853229dc8c58.tar.lz
nixpkgs-934f97281f19b79642eeea11454d853229dc8c58.tar.xz
nixpkgs-934f97281f19b79642eeea11454d853229dc8c58.tar.zst
nixpkgs-934f97281f19b79642eeea11454d853229dc8c58.zip
doc: fix programlistin formatting
Diffstat (limited to 'doc')
-rw-r--r--doc/packageconfig.xml39
1 files changed, 12 insertions, 27 deletions
diff --git a/doc/packageconfig.xml b/doc/packageconfig.xml
index 12a843029a9..b5e57df71ff 100644
--- a/doc/packageconfig.xml
+++ b/doc/packageconfig.xml
@@ -2,21 +2,18 @@
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xml:id="chap-packageconfig">
 
-<title>nixpkgs global configuration</title>
+<title><filename>~/.nixpkgs/config.nix</filename>: global configuration</title>
 
     <para>
-        Nix packages can be configured to allow or deny certain
-        options.
+      Nix packages can be configured to allow or deny certain options.
     </para>
 
     <para>
         To apply the configuration edit <filename>~/.nixpkgs/config.nix</filename>
         and set it like
-        <programlisting>
-            {
-                allowUnfree = true;
-            }
-        </programlisting>
+<programlisting>{
+  allowUnfree = true;
+}</programlisting>
         and will allow the Nix package manager to install unfree licensed packages.
 
         The configuration as listed also applies to NixOS under <option>nixpkgs.config</option> set.
@@ -26,16 +23,12 @@
         <listitem>
             <para>
                 Allow installing of packages that are distributed under unfree license by setting
-                <programlisting>
-                  allowUnfree = true;
-                </programlisting>
+                <programlisting>allowUnfree = true;</programlisting>
                 or deny them by setting it to <literal>false</literal>.
             </para>
             <para>
                 Same can be achieved by setting the environment variable:
-                <programlisting>
-                    export NIXPKGS_ALLOW_UNFREE=1
-                </programlisting>
+                <programlisting>$ export NIXPKGS_ALLOW_UNFREE=1</programlisting>
             </para>
         </listitem>
 
@@ -44,14 +37,10 @@
                 Whenever unfree packages are not allowed, single packages can
                 still be allowed by a predicate function that accepts package
                 as an argument and should return a boolean:
-                <programlisting>
-                  allowUnfreePredicate = (pkg: ...);
-                </programlisting>
+                <programlisting>allowUnfreePredicate = (pkg: ...);</programlisting>
 
                 Example to allow flash player only:
-                <programlisting>
-                  allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "flashplayer-" pkg.name);
-                </programlisting>
+                <programlisting>allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "flashplayer-" pkg.name);</programlisting>
             </para>
         </listitem>
 
@@ -59,9 +48,7 @@
             <para>
                 Whenever unfree packages are not allowed, packages can still be
                 whitelisted by their license:
-                <programlisting>
-                  whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ];
-                </programlisting>
+                <programlisting>whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ];</programlisting>
             </para>
         </listitem>
 
@@ -70,9 +57,7 @@
                 In addition to whitelisting licenses which are denied by the
                 <literal>allowUnfree</literal> setting, you can also explicitely
                 deny installation of packages which have a certain license:
-                <programlisting>
-                  blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ];
-                </programlisting>
+                <programlisting>blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ];</programlisting>
             </para>
         </listitem>
     </itemizedlist>
@@ -82,4 +67,4 @@
         <filename>lib/licenses.nix</filename> of the nix package tree.
     </para>
 
-</chapter>
+</chapter>
\ No newline at end of file