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

Split out GlobalConfig into its own header

This makes it easier to understand the reach of global variables /
global state in the config system.
This commit is contained in:
John Ericson 2024-06-24 11:34:58 -04:00
parent 903acc7c0f
commit 1620ad4587
22 changed files with 117 additions and 92 deletions

View file

@ -375,31 +375,6 @@ public:
void operator =(const std::optional<Path> & v);
};
struct GlobalConfig : public AbstractConfig
{
typedef std::vector<Config*> ConfigRegistrations;
static ConfigRegistrations * configRegistrations;
bool set(const std::string & name, const std::string & value) override;
void getSettings(std::map<std::string, SettingInfo> & res, bool overriddenOnly = false) override;
void resetOverridden() override;
nlohmann::json toJSON() override;
std::string toKeyValue() override;
void convertToArgs(Args & args, const std::string & category) override;
struct Register
{
Register(Config * config);
};
};
extern GlobalConfig globalConfig;
struct ExperimentalFeatureSettings : Config {