Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::LocalOverlayStoreConfig Struct Reference

#include <local-overlay-store.hh>

Inheritance diagram for nix::LocalOverlayStoreConfig:
nix::LocalStoreConfig nix::LocalFSStoreConfig nix::StoreConfig nix::StoreDirConfig nix::Config nix::AbstractConfig nix::LocalOverlayStore

Public Member Functions

 LocalOverlayStoreConfig (const StringMap &params)
 
 LocalOverlayStoreConfig (std::string_view scheme, PathView path, const Params &params)
 
const std::string name () override
 
std::optional< ExperimentalFeatureexperimentalFeature () const override
 
std::string doc () override
 
- Public Member Functions inherited from nix::LocalStoreConfig
 LocalStoreConfig (std::string_view scheme, std::string_view authority, const Params &params)
 
const std::string name () override
 
std::string doc () override
 
 LocalFSStoreConfig (PathView path, const Params &params)
 
- Public Member Functions inherited from nix::LocalFSStoreConfig
 LocalFSStoreConfig (PathView path, const Params &params)
 
 StoreConfig ()=delete
 
- Public Member Functions inherited from nix::StoreConfig
 StoreDirConfig ()=delete
 
- Public Member Functions inherited from nix::StoreDirConfig
StorePath parseStorePath (std::string_view path) const
 
std::optional< StorePathmaybeParseStorePath (std::string_view path) const
 
std::string printStorePath (const StorePath &path) const
 
StorePathSet parseStorePathSet (const PathSet &paths) const
 
PathSet printStorePathSet (const StorePathSet &path) const
 
std::string showPaths (const StorePathSet &paths)
 
bool isInStore (PathView path) const
 
bool isStorePath (std::string_view path) const
 
std::pair< StorePath, PathtoStorePath (PathView 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, HashcomputeStorePath (std::string_view name, const SourcePath &path, ContentAddressMethod method=FileIngestionMethod::NixArchive, HashAlgorithm hashAlgo=HashAlgorithm::SHA256, const StorePathSet &references={}, PathFilter &filter=defaultPathFilter) const
 
 Config (StringMap initials={})
 
- 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 ()
 

Static Public Member Functions

static std::set< std::string > uriSchemes ()
 
- Static Public Member Functions inherited from nix::LocalStoreConfig
static std::set< std::string > uriSchemes ()
 
- Static Public Member Functions inherited from nix::StoreConfig
static StringSet getDefaultSystemFeatures ()
 

Public Attributes

const Setting< std::string > lowerStoreUri
 
const PathSetting upperLayer
 
Setting< bool > checkMount
 
const PathSetting remountHook
 
- Public Attributes inherited from nix::LocalStoreConfig
Setting< bool > requireSigs
 
Setting< bool > readOnly
 
- Public Attributes inherited from nix::LocalFSStoreConfig
const OptionalPathSetting rootDir
 
const PathSetting stateDir
 
const PathSetting logDir
 
const PathSetting realStoreDir
 
- Public Attributes inherited from nix::StoreConfig
const Setting< intpathInfoCacheSize
 
const Setting< bool > isTrusted
 
Setting< intpriority
 
Setting< bool > wantMassQuery
 
Setting< StringSet > systemFeatures
 
- Public Attributes inherited from nix::StoreDirConfig
const PathSetting storeDir_
 
const Path storeDir = storeDir_
 

Protected Member Functions

Path toUpperPath (const StorePath &path)
 
- Protected Member Functions inherited from nix::AbstractConfig
 AbstractConfig (StringMap initials={})
 

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>
 
- Protected Attributes inherited from nix::AbstractConfig
StringMap unknownSettings
 

Detailed Description

Configuration for LocalOverlayStore.

Member Function Documentation

◆ doc()

std::string nix::LocalOverlayStoreConfig::doc ( )
overridevirtual

Documentation for this type of store.

Reimplemented from nix::StoreConfig.

◆ experimentalFeature()

std::optional< ExperimentalFeature > nix::LocalOverlayStoreConfig::experimentalFeature ( ) const
inlineoverridevirtual

An experimental feature this type store is gated, if it is to be experimental.

Reimplemented from nix::StoreConfig.

◆ name()

const std::string nix::LocalOverlayStoreConfig::name ( )
inlineoverridevirtual

The name of this type of store.

Implements nix::StoreConfig.

◆ toUpperPath()

Path nix::LocalOverlayStoreConfig::toUpperPath ( const StorePath & path)
protected
Returns
The host OS path corresponding to the store path for the upper layer.
Note
The there is no guarantee a store object is actually stored at that file path. It might be stored in the lower layer instead, or it might not be part of this store at all.

Member Data Documentation

◆ checkMount

Setting<bool> nix::LocalOverlayStoreConfig::checkMount
Initial value:
{(StoreConfig*) this, true, "check-mount",
R"(
Check that the overlay filesystem is correctly mounted.
Nix does not manage the overlayfs mount point itself, but the correct
functioning of the overlay store does depend on this mount point being set up
correctly. Rather than just assume this is the case, check that the lowerdir
and upperdir options are what we expect them to be. This check is on by
default, but can be disabled if needed.
)"}
Definition store-api.hh:101

◆ lowerStoreUri

const Setting<std::string> nix::LocalOverlayStoreConfig::lowerStoreUri
Initial value:
{(StoreConfig*) this, "", "lower-store",
R"(
[Store URL](@docroot@/command-ref/new-cli/nix3-help-stores.md#store-url-format)
for the lower store. The default is `auto` (i.e. use the Nix daemon or `/nix/store` directly).
Must be a store with a store dir on the file system.
Must be used as OverlayFS lower layer for this store's store dir.
)"}

◆ remountHook

const PathSetting nix::LocalOverlayStoreConfig::remountHook
Initial value:
{(StoreConfig*) this, "", "remount-hook",
R"(
Script or other executable to run when overlay filesystem needs remounting.
This is occasionally necessary when deleting a store path that exists in both upper and lower layers.
In such a situation, bypassing OverlayFS and deleting the path in the upper layer directly
is the only way to perform the deletion without creating a "whiteout".
However this causes the OverlayFS kernel data structures to get out-of-sync,
and can lead to 'stale file handle' errors; remounting solves the problem.
The store directory is passed as an argument to the invoked executable.
)"}

◆ upperLayer

const PathSetting nix::LocalOverlayStoreConfig::upperLayer
Initial value:
{(StoreConfig*) this, "", "upper-layer",
R"(
Directory containing the OverlayFS upper layer for this store's store dir.
)"}

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