aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-fs-store.hh
diff options
context:
space:
mode:
authorAlois Wohlschlager <alois1@gmx-topmail.de>2024-08-17 20:55:41 +0200
committerAlois Wohlschlager <alois1@gmx-topmail.de>2024-08-21 17:57:23 +0200
commite3c289dbe945415367dc1f54f85ad2452f5a97e0 (patch)
treeefb2480cb9e9fc7ffa5a90609033994a541302aa /src/libstore/local-fs-store.hh
parente38410799b5b78b2fc2b0c9e4b1dc0dfc5801097 (diff)
libutil/config: unify path setting types
There have been multiple setting types for paths that are supposed to be canonicalised, depending on whether zero or one, one, or any number of paths is to be specified. Naturally, they behaved in slightly different ways in the code. Simplify things by unifying them and removing special behaviour (mainly the "multiple paths type can coerce to boolean" thing). Change-Id: I7c1ce95e9c8e1829a866fb37d679e167811e9705
Diffstat (limited to 'src/libstore/local-fs-store.hh')
-rw-r--r--src/libstore/local-fs-store.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/local-fs-store.hh b/src/libstore/local-fs-store.hh
index 56de47424..5b7a149cb 100644
--- a/src/libstore/local-fs-store.hh
+++ b/src/libstore/local-fs-store.hh
@@ -11,21 +11,21 @@ struct LocalFSStoreConfig : virtual StoreConfig
{
using StoreConfig::StoreConfig;
- const OptionalPathSetting rootDir{this, std::nullopt,
+ const PathsSetting<std::optional<Path>> rootDir{this, std::nullopt,
"root",
"Directory prefixed to all other paths."};
- const PathSetting stateDir{this,
+ const PathsSetting<Path> stateDir{this,
rootDir.get() ? *rootDir.get() + "/nix/var/nix" : settings.nixStateDir,
"state",
"Directory where Lix will store state."};
- const PathSetting logDir{this,
+ const PathsSetting<Path> logDir{this,
rootDir.get() ? *rootDir.get() + "/nix/var/log/nix" : settings.nixLogDir,
"log",
"directory where Lix will store log files."};
- const PathSetting realStoreDir{this,
+ const PathsSetting<Path> realStoreDir{this,
rootDir.get() ? *rootDir.get() + "/nix/store" : storeDir, "real",
"Physical path of the Nix store."};
};