mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-13 01:36:15 +02:00
Also skip makeStoreWritable when read-only=true.
This commit is contained in:
parent
e484278e9b
commit
c47f744e05
1 changed files with 5 additions and 5 deletions
|
@ -190,7 +190,11 @@ LocalStore::LocalStore(const Params & params)
|
||||||
|
|
||||||
/* Create missing state directories if they don't already exist. */
|
/* Create missing state directories if they don't already exist. */
|
||||||
createDirs(realStoreDir);
|
createDirs(realStoreDir);
|
||||||
|
if (readOnly) {
|
||||||
|
experimentalFeatureSettings.require(Xp::ReadOnlyLocalStore);
|
||||||
|
} else {
|
||||||
makeStoreWritable();
|
makeStoreWritable();
|
||||||
|
}
|
||||||
createDirs(linksDir);
|
createDirs(linksDir);
|
||||||
Path profilesDir = stateDir + "/profiles";
|
Path profilesDir = stateDir + "/profiles";
|
||||||
createDirs(profilesDir);
|
createDirs(profilesDir);
|
||||||
|
@ -202,10 +206,6 @@ LocalStore::LocalStore(const Params & params)
|
||||||
createSymlink(profilesDir, gcRootsDir + "/profiles");
|
createSymlink(profilesDir, gcRootsDir + "/profiles");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (readOnly) {
|
|
||||||
experimentalFeatureSettings.require(Xp::ReadOnlyLocalStore);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto & perUserDir : {profilesDir + "/per-user", gcRootsDir + "/per-user"}) {
|
for (auto & perUserDir : {profilesDir + "/per-user", gcRootsDir + "/per-user"}) {
|
||||||
createDirs(perUserDir);
|
createDirs(perUserDir);
|
||||||
if (!readOnly) {
|
if (!readOnly) {
|
||||||
|
|
Loading…
Reference in a new issue