1
0
Fork 0
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:
Zhaofeng Li 2024-01-18 15:30:49 -07:00 committed by GitHub
commit a7c878bffc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 ];
};
};