mirror of
https://github.com/zhaofengli/attic.git
synced 2025-03-15 13:07:49 +00:00
Merge pull request #49 from icewind1991/module-readwritepaths
nixos: add storage path to ReadWritePaths
This commit is contained in:
commit
a7c878bffc
1 changed files with 4 additions and 0 deletions
|
@ -203,6 +203,10 @@ in
|
||||||
RestrictNamespaces = true;
|
RestrictNamespaces = true;
|
||||||
RestrictRealtime = true;
|
RestrictRealtime = true;
|
||||||
RestrictSUIDSGID = true;
|
RestrictSUIDSGID = true;
|
||||||
|
ReadWritePaths = let
|
||||||
|
path = cfg.settings.storage.path;
|
||||||
|
isDefaultStateDirectory = path == "/var/lib/atticd" || lib.hasPrefix "/var/lib/atticd/" path;
|
||||||
|
in lib.optionals (cfg.settings.storage.type or "" == "local" && !isDefaultStateDirectory) [ path ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue