summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-10-29 18:17:39 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-10-29 18:17:39 +0100
commitff4dea63c9403880500f82ce273713ecf793d2d9 (patch)
treeaa565e5bd7bbaca2ab23b5e71cdac0c49e926937 /doc
parentbb8e837e4ca95321141ad62fb3b2114310f2b24b (diff)
Generalize extra-* settings
This removes the extra-substituters and extra-sandbox-paths settings and instead makes every array setting extensible by setting "extra-<name> = <value>" in the configuration file or passing "--<name> <value>" on the command line.
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/src/command-ref/conf-file-prefix.md27
1 files changed, 19 insertions, 8 deletions
diff --git a/doc/manual/src/command-ref/conf-file-prefix.md b/doc/manual/src/command-ref/conf-file-prefix.md
index e53a3ddf4..3140170ab 100644
--- a/doc/manual/src/command-ref/conf-file-prefix.md
+++ b/doc/manual/src/command-ref/conf-file-prefix.md
@@ -22,19 +22,30 @@ By default Nix reads settings from the following places:
- If `NIX_CONFIG` 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
-path`, where *path* is interpreted relative to the current conf file and
-a missing file is an error unless `!include` is used instead. Comments
+The configuration files consist of `name = value` pairs, one per
+line. Other files can be included with a line like `include path`,
+where *path* is interpreted relative to the current conf file and a
+missing file is an error unless `!include` is used instead. Comments
start with a `#` character. Here is an example configuration file:
keep-outputs = true # Nice for developers
keep-derivations = true # Idem
-You can override settings on the command line using the `--option` flag,
-e.g. `--option keep-outputs
-false`.
+You can override settings on the command line using the `--option`
+flag, e.g. `--option keep-outputs false`. Every configuration setting
+also has a corresponding command line flag, e.g. `--max-jobs 16`; for
+Boolean settings, there are two flags to enable or disable the setting
+(e.g. `--keep-failed` and `--no-keep-failed`).
+
+A configuration setting usually overrides any previous value. However,
+you can prefix the name of the setting by `extra-` to *append* to the
+previous value. For instance,
+
+ substituters = a b
+ extra-substituters = c d
+
+defines the `substituters` setting to be `a b c d`. This is also
+available as a command line flag (e.g. `--extra-substituters`).
The following settings are currently available: