mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-19 17:46:46 +02:00
Guard the local overlay store behind an experimental feature
This commit is contained in:
parent
3fc838c8a8
commit
4b9a621812
5 changed files with 19 additions and 3 deletions
|
@ -56,6 +56,11 @@ struct LocalOverlayStoreConfig : virtual LocalStoreConfig
|
|||
|
||||
const std::string name() override { return "Experimental Local Overlay Store"; }
|
||||
|
||||
std::optional<ExperimentalFeature> experimentalFeature() const override
|
||||
{
|
||||
return ExperimentalFeature::LocalOverlayStore;
|
||||
}
|
||||
|
||||
std::string doc() override
|
||||
{
|
||||
return
|
||||
|
|
|
@ -1444,7 +1444,9 @@ std::shared_ptr<Store> openFromNonUri(const std::string & uri, const Store::Para
|
|||
} else if (uri == "local") {
|
||||
return std::make_shared<LocalStore>(params);
|
||||
} else if (uri == "local-overlay") {
|
||||
return std::make_shared<LocalOverlayStore>(params);
|
||||
auto store = std::make_shared<LocalOverlayStore>(params);
|
||||
experimentalFeatureSettings.require(store->experimentalFeature());
|
||||
return store;
|
||||
} else if (isNonUriPath(uri)) {
|
||||
Store::Params params2 = params;
|
||||
params2["root"] = absPath(uri);
|
||||
|
@ -1512,6 +1514,7 @@ ref<Store> openStore(const std::string & uri_,
|
|||
params.insert(uriParams.begin(), uriParams.end());
|
||||
|
||||
if (auto store = openFromNonUri(uri, params)) {
|
||||
experimentalFeatureSettings.require(store->experimentalFeature());
|
||||
store->warnUnknownSettings();
|
||||
return ref<Store>(store);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ struct ExperimentalFeatureDetails
|
|||
std::string_view description;
|
||||
};
|
||||
|
||||
constexpr std::array<ExperimentalFeatureDetails, 15> xpFeatureDetails = {{
|
||||
constexpr std::array<ExperimentalFeatureDetails, 16> xpFeatureDetails = {{
|
||||
{
|
||||
.tag = Xp::CaDerivations,
|
||||
.name = "ca-derivations",
|
||||
|
@ -228,6 +228,13 @@ constexpr std::array<ExperimentalFeatureDetails, 15> xpFeatureDetails = {{
|
|||
Allow the use of the `read-only` parameter in [local store](@docroot@/command-ref/new-cli/nix3-help-stores.md#local-store) URIs.
|
||||
)",
|
||||
},
|
||||
{
|
||||
.tag = Xp::LocalOverlayStore,
|
||||
.name = "local-overlay-store",
|
||||
.description = R"(
|
||||
Allow the use of [local overlay store](@docroot@/command-ref/new-cli/nix3-help-stores.md#local-overlay-store).
|
||||
)",
|
||||
},
|
||||
}};
|
||||
|
||||
static_assert(
|
||||
|
|
|
@ -32,6 +32,7 @@ enum struct ExperimentalFeature
|
|||
DynamicDerivations,
|
||||
ParseTomlTimestamps,
|
||||
ReadOnlyLocalStore,
|
||||
LocalOverlayStore,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,7 +16,7 @@ setupConfig () {
|
|||
addConfig "build-users-group = "
|
||||
}
|
||||
|
||||
|
||||
enableFeatures "local-overlay-store"
|
||||
|
||||
storeDirs () {
|
||||
# Attempt to create store dirs on tmpfs volume.
|
||||
|
|
Loading…
Reference in a new issue