From a20eb07837b9ef15d6ff24f3ad8fc3ff5de4c842 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Wed, 25 Dec 2024 16:48:05 +0100 Subject: fix(modules/git-server): Use `vhack.persist` for data-directories This avoids having to create them manually on the server and is, overall just generally a better way to solve this problem. --- modules/by-name/gi/git-server/module.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'modules/by-name/gi/git-server/module.nix') 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 = '' -- cgit 1.4.1