1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

Merge pull request #4166 from kampka/nix-conf-env

Add NIX_CONFIG env var for applying nix.conf overrides
This commit is contained in:
Eelco Dolstra 2020-10-21 14:26:45 +02:00 committed by GitHub
commit ecfebde6ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 0 deletions

View file

@ -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

View file

@ -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