about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-02-10 21:24:28 +0900
committersefidel <contact@sefidel.net>2024-02-10 21:24:28 +0900
commitdcab266a244a121ae204e44f05eaba32734b7624 (patch)
tree9bb1657d42b975b8b04790b68296bb933a8215f1
parenta3c1f5d64ce32f0561c84ba060afb65d85b87637 (diff)
downloadnixrc-dcab266a244a121ae204e44f05eaba32734b7624.tar.gz
nixrc-dcab266a244a121ae204e44f05eaba32734b7624.zip
feat(modules/atticd): persist atticd-watch-store config
-rw-r--r--modules/services/atticd.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/services/atticd.nix b/modules/services/atticd.nix
index fca181d..dcc9ea7 100644
--- a/modules/services/atticd.nix
+++ b/modules/services/atticd.nix
@@ -95,6 +95,9 @@ in
       wantedBy = [ "multi-user.target" ];
       wants = [ "network-online.target" ];
       serviceConfig = {
+        DynamicUser = true;
+        StateDirectory = "atticd-watch-store";
+        Environment = "XDG_CONFIG_HOME=/var/lib/atticd-watch-store";
         ExecStart = "${pkgs.attic}/bin/attic watch-store hydra";
         Restart = "on-failure";
         RestartSec = "5s";
@@ -108,5 +111,9 @@ in
         RestrictSUIDSGID = true;
       };
     };
+
+    modules.persistence.directories = [
+      "/var/lib/private/atticd-watch-store"
+    ];
   };
 }