summary refs log tree commit diff
path: root/nix/libstore/globals.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libstore/globals.cc')
-rw-r--r--nix/libstore/globals.cc44
1 files changed, 0 insertions, 44 deletions
diff --git a/nix/libstore/globals.cc b/nix/libstore/globals.cc
index 4ab6c3a0f9..fcafac2df6 100644
--- a/nix/libstore/globals.cc
+++ b/nix/libstore/globals.cc
@@ -78,39 +78,6 @@ void Settings::processEnvironment()
 }
 
 
-void Settings::loadConfFile()
-{
-    Path settingsFile = (format("%1%/%2%") % nixConfDir % "nix.conf").str();
-    if (!pathExists(settingsFile)) return;
-    string contents = readFile(settingsFile);
-
-    unsigned int pos = 0;
-
-    while (pos < contents.size()) {
-        string line;
-        while (pos < contents.size() && contents[pos] != '\n')
-            line += contents[pos++];
-        pos++;
-
-        string::size_type hash = line.find('#');
-        if (hash != string::npos)
-            line = string(line, 0, hash);
-
-        vector<string> tokens = tokenizeString<vector<string> >(line);
-        if (tokens.empty()) continue;
-
-        if (tokens.size() < 2 || tokens[1] != "=")
-            throw Error(format("illegal configuration line `%1%' in `%2%'") % line % settingsFile);
-
-        string name = tokens[0];
-
-        vector<string>::iterator i = tokens.begin();
-        advance(i, 2);
-        settings[name] = concatStringsSep(" ", Strings(i, tokens.end())); // FIXME: slow
-    };
-}
-
-
 void Settings::set(const string & name, const string & value)
 {
     settings[name] = value;
@@ -256,17 +223,6 @@ string Settings::pack()
 }
 
 
-void Settings::unpack(const string & pack) {
-    Strings lines = tokenizeString<Strings>(pack, "\n");
-    foreach (Strings::iterator, i, lines) {
-        string::size_type eq = i->find('=');
-        if (eq == string::npos)
-            throw Error("illegal option name/value");
-        set(i->substr(0, eq), i->substr(eq + 1));
-    }
-}
-
-
 Settings::SettingsMap Settings::getOverrides()
 {
     return overrides;