summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-10-24 00:43:14 +0200
committertv <tv@krebsco.de>2016-10-24 00:43:14 +0200
commit08c7671fc51270e582e16cbe49aa896f8bff7685 (patch)
treef78ee090fe97709c9a3c2cea7ddf5a0a79ae328d /krebs/3modules
parent059d7b2d058d29b04e33324e830a7bbac837535e (diff)
krebs.git: add cgit-clear-cache
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}