summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/git.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix
index e6b98a923..20907a3ed 100644
--- a/krebs/3modules/git.nix
+++ b/krebs/3modules/git.nix
@@ -389,6 +389,12 @@ let
mapAttrsToList repo-to-cgitrc cfg.repos
));
+ environment.systemPackages = [
+ (pkgs.writeDashBin "cgit-clear-cache" ''
+ ${pkgs.coreutils}/bin/rm -f ${cfg.cgit.settings.cache-root}/*
+ '')
+ ];
+
system.activationScripts.cgit = ''
mkdir -m 0700 -p ${cfg.cgit.settings.cache-root}
chown ${toString cfg.cgit.fcgiwrap.user.uid}:${toString cfg.cgit.fcgiwrap.group.gid} ${cfg.cgit.settings.cache-root}