aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/command-ref/conf-file.xml
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-05-28 10:58:22 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-05-28 10:58:22 -0400
commit4f597fb901dec55a86a2b29a122b9007177b2358 (patch)
treec89fff8fb0670fb55eb0c2593b6b48575a2ef914 /doc/manual/command-ref/conf-file.xml
parent87b32bab05ff91981c8847d66cd5502feb44f3b5 (diff)
parentf60ce4fa207a210e23a1142d3a8ead611526e6e1 (diff)
Merge branch 'master' of github.com:NixOS/nix into enum-class
Diffstat (limited to 'doc/manual/command-ref/conf-file.xml')
-rw-r--r--doc/manual/command-ref/conf-file.xml38
1 files changed, 21 insertions, 17 deletions
diff --git a/doc/manual/command-ref/conf-file.xml b/doc/manual/command-ref/conf-file.xml
index 48dce7c95..1fa74a143 100644
--- a/doc/manual/command-ref/conf-file.xml
+++ b/doc/manual/command-ref/conf-file.xml
@@ -19,26 +19,30 @@
<refsection><title>Description</title>
-<para>Nix reads settings from two configuration files:</para>
+<para>By default Nix reads settings from the following places:</para>
+
+<para>The system-wide configuration file
+<filename><replaceable>sysconfdir</replaceable>/nix/nix.conf</filename>
+(i.e. <filename>/etc/nix/nix.conf</filename> on most systems), or
+<filename>$NIX_CONF_DIR/nix.conf</filename> if
+<envar>NIX_CONF_DIR</envar> is set. Values loaded in this file are not forwarded to the Nix daemon. The
+client assumes that the daemon has already loaded them.
+</para>
-<itemizedlist>
+<para>User-specific configuration files:</para>
- <listitem>
- <para>The system-wide configuration file
- <filename><replaceable>sysconfdir</replaceable>/nix/nix.conf</filename>
- (i.e. <filename>/etc/nix/nix.conf</filename> on most systems), or
- <filename>$NIX_CONF_DIR/nix.conf</filename> if
- <envar>NIX_CONF_DIR</envar> is set.</para>
- </listitem>
+<para>
+ If <envar>NIX_USER_CONF_FILES</envar> is set, then each path separated by
+ <literal>:</literal> will be loaded in reverse order.
+</para>
- <listitem>
- <para>The user configuration file
- <filename>$XDG_CONFIG_HOME/nix/nix.conf</filename>, or
- <filename>~/.config/nix/nix.conf</filename> if
- <envar>XDG_CONFIG_HOME</envar> is not set.</para>
- </listitem>
+<para>
+ Otherwise it will look for <filename>nix/nix.conf</filename> files in
+ <envar>XDG_CONFIG_DIRS</envar> and <envar>XDG_CONFIG_HOME</envar>.
-</itemizedlist>
+ The default location is <filename>$HOME/.config/nix.conf</filename> if
+ those environment variables are unset.
+</para>
<para>The configuration files consist of
<literal><replaceable>name</replaceable> =
@@ -382,7 +386,7 @@ false</literal>.</para>
<programlisting>
builtins.fetchurl {
- url = https://example.org/foo-1.2.3.tar.xz;
+ url = "https://example.org/foo-1.2.3.tar.xz";
sha256 = "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae";
}
</programlisting>