Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::BinaryCacheStoreConfig Struct Reference
Inheritance diagram for nix::BinaryCacheStoreConfig:
nix::StoreConfig nix::StoreConfigBase nix::StoreDirConfig nix::Config nix::AbstractConfig nix::HttpBinaryCacheStoreConfig nix::LocalBinaryCacheStoreConfig nix::S3BinaryCacheStoreConfig nix::testing::TestHttpBinaryCacheStoreConfig

Public Member Functions

 BinaryCacheStoreConfig (const Params &params)
Public Member Functions inherited from nix::StoreConfig
 StoreConfig (const Params &params, FilePathType pathType)
StringMap getQueryParams () const
virtual bool getReadOnly () const
virtual const std::filesystem::path & getStateDir () const
virtual const std::filesystem::path & getLogDir () const
virtual ref< Store > openStore () const =0
virtual StoreReference getReference () const
virtual std::string getHumanReadableURI () const
Public Member Functions inherited from nix::StoreConfigBase
 StoreConfigBase (const StoreReference::Params &params, FilePathType pathType)
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) const override
void resetOverridden () override
nlohmann::json toJSON () override
std::string toKeyValue (bool overriddenOnly=false) 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 ()
Public Member Functions inherited from nix::StoreDirConfig
StorePath parseStorePath (std::string_view path) const
StorePath parseStorePathCanonical (std::string_view path) const
std::optional< StorePath > maybeParseStorePath (std::string_view path) const
std::string printStorePath (const StorePath &path) const
StringSet printStorePathSet (const StorePathSet &path) const
std::size_t maxCanonicalStorePathLen () const noexcept
bool isInStore (std::string_view path) const
bool isStorePath (std::string_view path) const
std::pair< StorePath, CanonPath > toStorePath (std::string_view path) const
StorePath makeStorePath (std::string_view type, std::string_view hash, std::string_view name) const
StorePath makeStorePath (std::string_view type, const Hash &hash, std::string_view name) const
StorePath makeOutputPath (std::string_view id, const Hash &hash, std::string_view name) const
StorePath makeFixedOutputPath (std::string_view name, const FixedOutputInfo &info) const
StorePath makeFixedOutputPathFromCA (std::string_view name, const ContentAddressWithReferences &ca) const
std::pair< StorePath, Hash > computeStorePath (std::string_view name, const SourcePath &path, ContentAddressMethod method=ContentAddressMethod::Raw::NixArchive, HashAlgorithm hashAlgo=HashAlgorithm::SHA256, const StorePathSet &references={}, PathFilter &filter=defaultPathFilter) const

Public Attributes

Setting< CompressionAlgo > compression
Setting< bool > writeNARListing
Setting< bool > writeDebugInfo
Setting< std::optional< AbsolutePath > > secretKeyFile
Setting< std::string > secretKeyFiles
Setting< std::optional< AbsolutePath > > localNarCache
Setting< bool > parallelCompression
Setting< int > compressionLevel
Public Attributes inherited from nix::StoreConfig
Setting< int > pathInfoCacheSize
Setting< bool > isTrusted
Setting< int > priority
Setting< bool > wantMassQuery
Setting< StringSet > systemFeatures
Public Attributes inherited from nix::StoreConfigBase
StoreDirSetting storeDir_
Public Attributes inherited from nix::StoreDirConfig
const std::string & storeDir

Additional Inherited Members

Public Types inherited from nix::StoreConfig
using Params = StoreReference::Params
Public Types inherited from nix::Config
using Settings = std::map<std::string, SettingData>
Static Public Member Functions inherited from nix::StoreConfig
static StringSet getDefaultSystemFeatures ()
static std::string doc ()
static std::optional< ExperimentalFeature > experimentalFeature ()
Protected Types inherited from nix::StoreConfigBase
enum struct  FilePathType { Unix , Native }
Protected Member Functions inherited from nix::AbstractConfig
 AbstractConfig (StringMap initials={})
Protected Attributes inherited from nix::AbstractConfig
StringMap unknownSettings

Member Data Documentation

◆ compression

Setting<CompressionAlgo> nix::BinaryCacheStoreConfig::compression
Initial value:
{
this,
CompressionAlgo::xz,
"compression",
R"(
NAR compression method. One of: `xz`, `bzip2`, `gzip`, `zstd`, `none`, `br`, `compress`, `grzip`, `lrzip`, `lz4`, `lzip`, `lzma` or `lzop`.
To use a particular compression method Nix has to be built with a version of libarchive that natively supports that compression algorithm.
)"}

◆ compressionLevel

Setting<int> nix::BinaryCacheStoreConfig::compressionLevel
Initial value:
{
this,
-1,
"compression-level",
R"(
The *preset level* to be used when compressing NARs.
The meaning and accepted values depend on the compression method selected.
`-1` specifies that the default compression level should be used.
)"}

◆ localNarCache

Setting<std::optional<AbsolutePath> > nix::BinaryCacheStoreConfig::localNarCache
Initial value:
{
this,
std::nullopt,
"local-nar-cache",
"Path to a local cache of NARs fetched from this binary cache, used by commands such as `nix store cat`."}

◆ parallelCompression

Setting<bool> nix::BinaryCacheStoreConfig::parallelCompression
Initial value:
{
this,
false,
"parallel-compression",
R"(
Enable multi-threaded compression of NARs. This is currently only available for `xz` and `zstd`.
If not set explicitly, defaults to `true` when `compression` is `zstd` and `false` otherwise.
)"}

◆ secretKeyFile

Setting<std::optional<AbsolutePath> > nix::BinaryCacheStoreConfig::secretKeyFile
Initial value:
{
this, std::nullopt, "secret-key", "Path to the secret key used to sign the binary cache."}

◆ secretKeyFiles

Setting<std::string> nix::BinaryCacheStoreConfig::secretKeyFiles
Initial value:
{
this, "", "secret-keys", "List of comma-separated paths to the secret keys used to sign the binary cache."}

◆ writeDebugInfo

Setting<bool> nix::BinaryCacheStoreConfig::writeDebugInfo
Initial value:
{
this,
false,
"index-debug-info",
R"(
Whether to index DWARF debug info files by build ID. This allows [`dwarffs`](https://github.com/edolstra/dwarffs) to
fetch debug info on demand
)"}

◆ writeNARListing

Setting<bool> nix::BinaryCacheStoreConfig::writeNARListing
Initial value:
{
this, false, "write-nar-listing", "Whether to write a JSON file that lists the files in each NAR."}

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