1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Read per-user settings from ~/.config/nix/nix.conf

This commit is contained in:
Eelco Dolstra 2017-04-20 14:58:16 +02:00
parent 562585e901
commit f05d5f89ff
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
8 changed files with 70 additions and 24 deletions

View file

@ -51,9 +51,11 @@ public:
void warnUnknownSettings();
StringMap getSettings();
StringMap getSettings(bool overridenOnly = false);
void applyConfigFile(const Path & path, bool fatal = false);
void resetOverriden();
};
class AbstractSetting
@ -68,6 +70,8 @@ public:
int created = 123;
bool overriden = false;
protected:
AbstractSetting(
@ -78,7 +82,7 @@ protected:
virtual ~AbstractSetting()
{
// Check against a gcc miscompilation causing our constructor
// not to run.
// not to run (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431).
assert(created == 123);
}
@ -88,6 +92,8 @@ protected:
bool parseBool(const std::string & str);
std::string printBool(bool b);
bool isOverriden() { return overriden; }
};
struct DefaultSettingTag { };