mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
Generate the nix.conf docs from the source code
This means we don't have two (divergent) sets of option descriptions anymore.
This commit is contained in:
parent
34b22e0123
commit
c8fa39324a
10 changed files with 802 additions and 834 deletions
39
doc/manual/src/command-ref/conf-file-prefix.md
Normal file
39
doc/manual/src/command-ref/conf-file-prefix.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
Title: nix.conf
|
||||
|
||||
# Name
|
||||
|
||||
`nix.conf` - Nix configuration file
|
||||
|
||||
# Description
|
||||
|
||||
By default Nix reads settings from the following places:
|
||||
|
||||
- The system-wide configuration file `sysconfdir/nix/nix.conf` (i.e.
|
||||
`/etc/nix/nix.conf` on most systems), or `$NIX_CONF_DIR/nix.conf` if
|
||||
`NIX_CONF_DIR` is set. Values loaded in this file are not forwarded
|
||||
to the Nix daemon. The client assumes that the daemon has already
|
||||
loaded them.
|
||||
|
||||
- If `NIX_USER_CONF_FILES` is set, then each path separated by `:`
|
||||
will be loaded in reverse order.
|
||||
|
||||
Otherwise it will look for `nix/nix.conf` files in `XDG_CONFIG_DIRS`
|
||||
and `XDG_CONFIG_HOME`. If these are unset, it will look in
|
||||
`$HOME/.config/nix.conf`.
|
||||
|
||||
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`.
|
||||
|
||||
The following settings are currently available:
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue