From 08c7671fc51270e582e16cbe49aa896f8bff7685 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 24 Oct 2016 00:43:14 +0200 Subject: krebs.git: add cgit-clear-cache --- krebs/3modules/git.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'krebs') 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} -- cgit v1.2.3