aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/globals.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index 1238dc530..4df68d0c9 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -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()