summary refs log tree commit diff
path: root/doc/packageconfig.xml
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-01-24 20:40:40 +0100
committerDomen Kožar <domen@dev.si>2015-01-25 21:19:07 +0100
commit9bb80ffa2c1b944ac2fd126ed7de4f2e8a97cf62 (patch)
tree3207e7bbb32b82abd7849235d2d97292dfafbd1b /doc/packageconfig.xml
parent2daba83828fc09cfa52ca416c1af5ae44155d034 (diff)
downloadnixlib-9bb80ffa2c1b944ac2fd126ed7de4f2e8a97cf62.tar
nixlib-9bb80ffa2c1b944ac2fd126ed7de4f2e8a97cf62.tar.gz
nixlib-9bb80ffa2c1b944ac2fd126ed7de4f2e8a97cf62.tar.bz2
nixlib-9bb80ffa2c1b944ac2fd126ed7de4f2e8a97cf62.tar.lz
nixlib-9bb80ffa2c1b944ac2fd126ed7de4f2e8a97cf62.tar.xz
nixlib-9bb80ffa2c1b944ac2fd126ed7de4f2e8a97cf62.tar.zst
nixlib-9bb80ffa2c1b944ac2fd126ed7de4f2e8a97cf62.zip
Add documentation for nixpkgs.config settings (allowUnfree, allowUnfreePredicate, whitelistedLicenses, blacklistedLicenses)
Diffstat (limited to 'doc/packageconfig.xml')
-rw-r--r--doc/packageconfig.xml63
1 files changed, 63 insertions, 0 deletions
diff --git a/doc/packageconfig.xml b/doc/packageconfig.xml
new file mode 100644
index 000000000000..aaeaff69f4ac
--- /dev/null
+++ b/doc/packageconfig.xml
@@ -0,0 +1,63 @@
+<chapter xmlns="http://docbook.org/ns/docbook"
+         xmlns:xlink="http://www.w3.org/1999/xlink"
+         xml:id="chap-packageconfig">
+
+<title>nixpkgs configuration</title>
+
+    <para>
+        The Nix package manager can be configured to allow or deny certain
+        package sets. At this moment, packages can either be allowed to be
+        installed or denied to be installed based on their license.
+    </para>
+
+    <itemizedlist>
+        <listitem>
+            <para>
+                Allow packages that do not have a free license by setting
+                <programlisting>
+                    nixpkgs.config.allowUnfree = true;
+                </programlisting>
+                or deny them by setting it to <literal>false</literal>.
+            </para>
+            <para>
+                This can also be achieved for one call to the Nix package
+                manager by setting the environment variable:
+                <programlisting>
+                    export NIXPKGS_ALLOW_UNFREE=1
+                </programlisting>
+            </para>
+        </listitem>
+
+        <listitem>
+            <para>
+                Whenever unfree packages are not allowed, single packages can
+                still be allowed by a predicate:
+                <programlisting>
+                    nixpkgs.config.allowUnfreePredicate = (x: ...);
+                </programlisting>
+            </para>
+        </listitem>
+
+        <listitem>
+            <para>
+                Whenever unfree packages are not allowed, packages can still be
+                whitelisted by their license:
+                <programlisting>
+                    nixpkgs.config.whitelistedLicenses = [ licenseA licenseB ];
+                </programlisting>
+            </para>
+        </listitem>
+
+        <listitem>
+            <para>
+                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>
+                    nixpkgs.config.blacklistedLicenses = [ licenseA licenseB ];
+                </programlisting>
+            </para>
+        </listitem>
+    </itemizedlist>
+
+</chapter>