diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-08-04T16·13+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-08-04T16·13+0200 |
commit | 988bf594215007c96903b4a646b0cf024fb8f596 (patch) | |
tree | b155079509d3d6302e9efb2a7db1c50bed307852 /src/libstore/globals.cc | |
parent | daccd6899908bd1490cddb393700ec1e9b222aea (diff) |
Move some options out of globals
Diffstat (limited to 'src/libstore/globals.cc')
-rw-r--r-- | src/libstore/globals.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index 8fad6e5a9f83..23ece4a23369 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -63,8 +63,6 @@ Settings::Settings() lockCPU = getEnv("NIX_AFFINITY_HACK", "1") == "1"; showTrace = false; enableImportNative = false; - trustedUsers = Strings({"root"}); - allowedUsers = Strings({"*"}); } @@ -130,6 +128,14 @@ string Settings::get(const string & name, const string & def) } +Strings Settings::get(const string & name, const Strings & def) +{ + auto i = settings.find(name); + if (i == settings.end()) return def; + return tokenizeString<Strings>(i->second); +} + + void Settings::update() { _get(tryFallback, "build-fallback"); @@ -161,8 +167,6 @@ void Settings::update() _get(logServers, "log-servers"); _get(enableImportNative, "allow-unsafe-native-code-during-evaluation"); _get(useCaseHack, "use-case-hack"); - _get(trustedUsers, "trusted-users"); - _get(allowedUsers, "allowed-users"); string subs = getEnv("NIX_SUBSTITUTERS", "default"); if (subs == "default") { |