diff options
author | tv <tv@krebsco.de> | 2016-10-24 00:43:14 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-10-24 00:43:14 +0200 |
commit | 08c7671fc51270e582e16cbe49aa896f8bff7685 (patch) | |
tree | f78ee090fe97709c9a3c2cea7ddf5a0a79ae328d /krebs | |
parent | 059d7b2d058d29b04e33324e830a7bbac837535e (diff) |
krebs.git: add cgit-clear-cache
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/3modules/git.nix | 6 |
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} |