summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-10-21 14:26:45 +0200
committerGitHub <noreply@github.com>2020-10-21 14:26:45 +0200
commitecfebde6ffbf8fa3184a74cb685ec340ee87291a (patch)
tree03f389bde3c5f626dd4636bdb5859fb9995802c8 /doc
parentbdf2bcc989348fdcf223c9e2a383618454453eb2 (diff)
parent461cf2b85601e4510bff303e454059d80b9df8c0 (diff)
Merge pull request #4166 from kampka/nix-conf-env
Add NIX_CONFIG env var for applying nix.conf overrides
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/src/command-ref/conf-file-prefix.md3
-rw-r--r--doc/manual/src/command-ref/env-common.md5
2 files changed, 8 insertions, 0 deletions
diff --git a/doc/manual/src/command-ref/conf-file-prefix.md b/doc/manual/src/command-ref/conf-file-prefix.md
index 9987393d2..d38456788 100644
--- a/doc/manual/src/command-ref/conf-file-prefix.md
+++ b/doc/manual/src/command-ref/conf-file-prefix.md
@@ -19,6 +19,9 @@ By default Nix reads settings from the following places:
and `XDG_CONFIG_HOME`. If these are unset, it will look in
`$HOME/.config/nix.conf`.
+ - If `NIX_OPTIONS` is set, its contents is treated as the contents of
+ a configuration file.
+
The configuration files consist of `name =
value` pairs, one per line. Other files can be included with a line like
`include
diff --git a/doc/manual/src/command-ref/env-common.md b/doc/manual/src/command-ref/env-common.md
index 03016dba7..27e730fc8 100644
--- a/doc/manual/src/command-ref/env-common.md
+++ b/doc/manual/src/command-ref/env-common.md
@@ -81,6 +81,11 @@ Most Nix commands interpret the following environment variables:
Overrides the location of the system Nix configuration directory
(default `prefix/etc/nix`).
+ - `NIX_OPTIONS`
+ Applies settings from Nix configuration from the environment.
+ The content is treated as if it was read from a Nix configuration file.
+ Settings are separated by the newline character.
+
- `NIX_USER_CONF_FILES`
Overrides the location of the user Nix configuration files to load
from (defaults to the XDG spec locations). The variable is treated