Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::GlobalConfig Struct Reference
Inheritance diagram for nix::GlobalConfig:
nix::AbstractConfig

Classes

struct  Register

Public Types

typedef std::vector< Config * > ConfigRegistrations

Public Member Functions

bool set (const std::string &name, const std::string &value, const ApplyConfigOptions &options={}) override
void getSettings (std::map< std::string, SettingInfo > &res, bool overriddenOnly=false) override
void resetOverridden () override
JSON toJSON () override
std::string toKeyValue (bool overriddenOnly=false)
void convertToArgs (Args &args, const std::string &category) override
Public Member Functions inherited from nix::AbstractConfig
void applyConfig (const std::string &contents, const ApplyConfigOptions &options={})
void warnUnknownSettings ()
void reapplyUnknownSettings ()

Static Public Attributes

static ConfigRegistrations * configRegistrations

Additional Inherited Members

Protected Member Functions inherited from nix::AbstractConfig
 AbstractConfig (StringMap initials={})
Protected Attributes inherited from nix::AbstractConfig
StringMap unknownSettings

Member Function Documentation

◆ convertToArgs()

void nix::GlobalConfig::convertToArgs ( Args & args,
const std::string & category )
overridevirtual

Converts settings to Args to be used on the command line interface

  • args: args to write to
  • category: category of the settings

Implements nix::AbstractConfig.

◆ getSettings()

void nix::GlobalConfig::getSettings ( std::map< std::string, SettingInfo > & res,
bool overriddenOnly = false )
overridevirtual

Adds the currently known settings to the given result map res.

  • res: map to store settings in
  • overriddenOnly: when set to true only overridden settings will be added to res

Implements nix::AbstractConfig.

◆ resetOverridden()

void nix::GlobalConfig::resetOverridden ( )
overridevirtual

Resets the overridden flag of all Settings

Implements nix::AbstractConfig.

◆ set()

bool nix::GlobalConfig::set ( const std::string & name,
const std::string & value,
const ApplyConfigOptions & options = {} )
overridevirtual

Sets the value referenced by name to value. Returns true if the setting is known, false otherwise.

Implements nix::AbstractConfig.

◆ toJSON()

JSON nix::GlobalConfig::toJSON ( )
overridevirtual

Outputs all settings to JSON

  • out: JSONObject to write the configuration to

Implements nix::AbstractConfig.

◆ toKeyValue()

std::string nix::GlobalConfig::toKeyValue ( bool overriddenOnly = false)

Outputs all settings in a key-value pair format suitable to be used as nix.conf


The documentation for this struct was generated from the following files:
  • lix/libutil/config.hh
  • lix/libutil/config.cc