diff options
author | lassulus <lass@blue.r> | 2018-09-04 20:40:20 +0200 |
---|---|---|
committer | lassulus <lass@blue.r> | 2018-09-04 20:40:20 +0200 |
commit | e183bb1c80c42131f9e3d932985e413ef457f77a (patch) | |
tree | f728e5c1a97550d12de72af3a63740ddca69b975 /krebs/3modules | |
parent | 8760874b7a7a746d5dd0bf179bd41e9e2291bb77 (diff) | |
parent | 000f2a7c9123fcd4b110c6c220570758d556c837 (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/3modules')
-rw-r--r-- | krebs/3modules/git.nix | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix index 5ae24b40b..8a923efd2 100644 --- a/krebs/3modules/git.nix +++ b/krebs/3modules/git.nix @@ -348,6 +348,10 @@ let users.users.${cfg.user.name} = { inherit (cfg.user) home name uid; description = "Git repository hosting user"; + extraGroups = [ + # To allow running cgit-clear-cache via hooks. + cfg.cgit.fcgiwrap.group.name + ]; shell = "/bin/sh"; openssh.authorizedKeys.keys = unique @@ -403,13 +407,12 @@ let )); environment.systemPackages = [ - (pkgs.writeDashBin "cgit-clear-cache" '' - ${pkgs.coreutils}/bin/rm -f ${cfg.cgit.settings.cache-root}/* - '') + (pkgs.cgit-clear-cache.override { inherit (cfg.cgit.settings) cache-root; }) ]; system.activationScripts.cgit = '' - mkdir -m 0700 -p ${cfg.cgit.settings.cache-root} + mkdir -m 0770 -p ${cfg.cgit.settings.cache-root} + chmod 0770 ${cfg.cgit.settings.cache-root} chown ${toString cfg.cgit.fcgiwrap.user.uid}:${toString cfg.cgit.fcgiwrap.group.gid} ${cfg.cgit.settings.cache-root} ''; |