summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-07-04 21:49:24 +0200
committerSoispha <soispha@vhack.eu>2023-07-04 21:49:24 +0200
commit6e18fa4cda3e2d6d910a42c54c3d38266043331c (patch)
tree0f11fefe083d1e259d6a9e87cbe9b9c9c11f26f6
parentDocs(system/services/nix-sync): Change last remnant from git-sync (diff)
downloadnixos-server-6e18fa4cda3e2d6d910a42c54c3d38266043331c.tar.gz
nixos-server-6e18fa4cda3e2d6d910a42c54c3d38266043331c.zip
Fix(system/services/nix-sync): Use cache directory
-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";