Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::fetchers::Settings Struct Reference
Inheritance diagram for nix::fetchers::Settings:
nix::Config nix::AbstractConfig

Public Attributes

Setting< StringMap > accessTokens
 
Setting< bool > allowDirty
 
Setting< bool > warnDirty
 
Setting< bool > allowDirtyLocks
 
Setting< bool > trustTarballsFromGitForges
 
Setting< std::string > flakeRegistry
 

Additional Inherited Members

- Public Types inherited from nix::Config
using Settings = std::map<std::string, SettingData>
 
- Public Member Functions inherited from nix::Config
 Config (StringMap initials={})
 
bool set (const std::string &name, const std::string &value) override
 
void addSetting (AbstractSetting *setting)
 
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
 
- Public Member Functions inherited from nix::AbstractConfig
void applyConfig (const std::string &contents, const std::string &path="<unknown>")
 
void warnUnknownSettings ()
 
void reapplyUnknownSettings ()
 
- Protected Member Functions inherited from nix::AbstractConfig
 AbstractConfig (StringMap initials={})
 
- Protected Attributes inherited from nix::AbstractConfig
StringMap unknownSettings
 

Member Data Documentation

◆ allowDirty

Setting<bool> nix::fetchers::Settings::allowDirty
Initial value:
{this, true, "allow-dirty",
"Whether to allow dirty Git/Mercurial trees."}

◆ allowDirtyLocks

Setting<bool> nix::fetchers::Settings::allowDirtyLocks
Initial value:
{
this,
false,
"allow-dirty-locks",
R"(
Whether to allow dirty inputs (such as dirty Git workdirs)
to be locked via their NAR hash. This is generally bad
practice since Nix has no way to obtain such inputs if they
are subsequently modified. Therefore lock files with dirty
locks should generally only be used for local testing, and
should not be pushed to other users.
)",
{},
true,
Xp::Flakes}

◆ flakeRegistry

Setting<std::string> nix::fetchers::Settings::flakeRegistry
Initial value:
{this, "https://channels.nixos.org/flake-registry.json", "flake-registry",
R"(
Path or URI of the global flake registry.
When empty, disables the global flake registry.
)",
{}, true, Xp::Flakes}

◆ trustTarballsFromGitForges

Setting<bool> nix::fetchers::Settings::trustTarballsFromGitForges
Initial value:
{
this, true, "trust-tarballs-from-git-forges",
R"(
If enabled (the default), Nix will consider tarballs from
GitHub and similar Git forges to be locked if a Git revision
is specified,
e.g. `github:NixOS/patchelf/7c2f768bf9601268a4e71c2ebe91e2011918a70f`.
This requires Nix to trust that the provider will return the
correct contents for the specified Git revision.
If disabled, such tarballs are only considered locked if a
`narHash` attribute is specified,
e.g. `github:NixOS/patchelf/7c2f768bf9601268a4e71c2ebe91e2011918a70f?narHash=sha256-PPXqKY2hJng4DBVE0I4xshv/vGLUskL7jl53roB8UdU%3D`.
)"}

◆ warnDirty

Setting<bool> nix::fetchers::Settings::warnDirty
Initial value:
{this, true, "warn-dirty",
"Whether to warn about dirty Git/Mercurial trees."}

The documentation for this struct was generated from the following files: