From 934f97281f19b79642eeea11454d853229dc8c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Sun, 15 Feb 2015 18:29:52 +0100 Subject: [PATCH] doc: fix programlistin formatting --- doc/packageconfig.xml | 39 ++++++++++++--------------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/doc/packageconfig.xml b/doc/packageconfig.xml index 12a843029a90..b5e57df71ffc 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"> -nixpkgs global configuration +<filename>~/.nixpkgs/config.nix</filename>: global configuration - Nix packages can be configured to allow or deny certain - options. + Nix packages can be configured to allow or deny certain options. To apply the configuration edit ~/.nixpkgs/config.nix and set it like - - { - allowUnfree = true; - } - +{ + allowUnfree = true; +} and will allow the Nix package manager to install unfree licensed packages. The configuration as listed also applies to NixOS under set. @@ -26,16 +23,12 @@ Allow installing of packages that are distributed under unfree license by setting - - allowUnfree = true; - + allowUnfree = true; or deny them by setting it to false. Same can be achieved by setting the environment variable: - - export NIXPKGS_ALLOW_UNFREE=1 - + $ export NIXPKGS_ALLOW_UNFREE=1 @@ -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: - - allowUnfreePredicate = (pkg: ...); - + allowUnfreePredicate = (pkg: ...); Example to allow flash player only: - - allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "flashplayer-" pkg.name); - + allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "flashplayer-" pkg.name); @@ -59,9 +48,7 @@ Whenever unfree packages are not allowed, packages can still be whitelisted by their license: - - whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ]; - + whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ]; @@ -70,9 +57,7 @@ In addition to whitelisting licenses which are denied by the allowUnfree setting, you can also explicitely deny installation of packages which have a certain license: - - blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ]; - + blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ]; @@ -82,4 +67,4 @@ lib/licenses.nix of the nix package tree. - + \ No newline at end of file