mirror of
https://github.com/zhaofengli/attic.git
synced 2024-12-14 11:57:30 +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;
|
||||
RestrictRealtime = 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…
Reference in a new issue