summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--modules/by-name/gi/git-server/module.nix14
-rw-r--r--tests/by-name/gi/git-server/test.nix12
2 files changed, 13 insertions, 13 deletions
diff --git a/modules/by-name/gi/git-server/module.nix b/modules/by-name/gi/git-server/module.nix
index a374f4c..db35897 100644
--- a/modules/by-name/gi/git-server/module.nix
+++ b/modules/by-name/gi/git-server/module.nix
@@ -48,13 +48,23 @@ in {
     };
 
     # Needed for the nginx proxy and the virtual host
-    vhack.nginx.enable = true;
+    vhack = {
+      nginx.enable = true;
+      persist.directories = [
+        {
+          directory = "/var/lib/gitolite";
+          user = "git";
+          group = "git";
+          mode = "0755";
+        }
+      ];
+    };
 
     services = {
       gitolite = {
         inherit (cfg.gitolite) adminPubkey;
         enable = true;
-        dataDir = "/srv/gitolite";
+        dataDir = "/var/lib/gitolite";
         user = "git";
         group = "git";
         extraGitoliteRc = ''
diff --git a/tests/by-name/gi/git-server/test.nix b/tests/by-name/gi/git-server/test.nix
index 0cf3ee8..5cd8c33 100644
--- a/tests/by-name/gi/git-server/test.nix
+++ b/tests/by-name/gi/git-server/test.nix
@@ -62,18 +62,8 @@ in
             ../../../../modules
           ];
 
-        system.activationScripts = {
-          gitolite = {
-            text = ''
-              if ! [ -d /srv/gitolite ]; then
-                mkdir --parents /srv/gitolite
-                chown -R git:git /srv/gitolite
-              fi
-            '';
-          };
-        };
-
         vhack = {
+          persist.enable = true;
           openssh.enable = true;
           nginx = {
             enable = true;