1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-18 08:19:35 +01:00

Allow loading config files into other config objects

This gives us some hope of moving away from global variables.
This commit is contained in:
John Ericson 2024-06-24 11:55:36 -04:00
parent b46e13840b
commit cb0c868da4
2 changed files with 12 additions and 6 deletions

View file

@ -1284,7 +1284,13 @@ extern Settings settings;
*/
void initPlugins();
void loadConfFile();
/**
* Load the configuration (from `nix.conf`, `NIX_CONFIG`, etc.) into the
* given configuration object.
*
* Usually called with `globalConfig`.
*/
void loadConfFile(AbstractConfig & config);
// Used by the Settings constructor
std::vector<Path> getUserConfigFiles();