mirror of
https://github.com/NixOS/nix
synced 2025-06-30 11:43:15 +02:00
Add NIX_CONFIG env var for applying nix.conf overrides
This commit is contained in:
parent
21244e1062
commit
461cf2b856
4 changed files with 23 additions and 0 deletions
|
@ -86,6 +86,12 @@ void loadConfFile()
|
|||
for (auto file = files.rbegin(); file != files.rend(); file++) {
|
||||
globalConfig.applyConfigFile(*file);
|
||||
}
|
||||
|
||||
auto nixConfEnv = getEnv("NIX_CONFIG");
|
||||
if (nixConfEnv.has_value()) {
|
||||
globalConfig.applyConfig(nixConfEnv.value(), "NIX_CONFIG");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<Path> getUserConfigFiles()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue