summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--system/services/nix-sync/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/system/services/nix-sync/default.nix b/system/services/nix-sync/default.nix
index 67df089..c8f6c44 100644
--- a/system/services/nix-sync/default.nix
+++ b/system/services/nix-sync/default.nix
@@ -20,6 +20,7 @@
     repoCachePath = cfg.cachePath + optionalPathSeparator + repo.path;
     execStartScript = pkgs.writeScript "git-sync-exec" ''
       #! /usr/bin/env dash
+      export XDG_CACHE_HOME="$CACHE_DIRECTORY";
       cd ${esa repoCachePath};
 
       while true; do
@@ -41,6 +42,7 @@
       done
     '';
     execStartPreScript = ''
+      export XDG_CACHE_HOME="$CACHE_DIRECTORY";
       if ! stat ${esa repoCachePath}/.git; then
           mkdir --parents ${esa repoCachePath};
           git clone ${esa repo.uri} ${esa repoCachePath};
@@ -67,13 +69,13 @@
       User = cfg.user;
       Group = cfg.group;
       # Runtime directory and mode
-      RuntimeDirectory = "nginx";
+      RuntimeDirectory = "nix-sync";
       RuntimeDirectoryMode = "0750";
       # Cache directory and mode
-      CacheDirectory = "nginx";
+      CacheDirectory = "nix-sync";
       CacheDirectoryMode = "0750";
       # Logs directory and mode
-      LogsDirectory = "nginx";
+      LogsDirectory = "nix-sync";
       LogsDirectoryMode = "0750";
       # Proc filesystem
       ProcSubset = "pid";