cgit-clear-cache: init
This commit is contained in:
parent
ce31457b77
commit
23d2950ed7
@ -403,9 +403,7 @@ let
|
|||||||
));
|
));
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.writeDashBin "cgit-clear-cache" ''
|
(pkgs.cgit-clear-cache.override { inherit (cfg.cgit.settings) cache-root; })
|
||||||
${pkgs.coreutils}/bin/rm -f ${cfg.cgit.settings.cache-root}/*
|
|
||||||
'')
|
|
||||||
];
|
];
|
||||||
|
|
||||||
system.activationScripts.cgit = ''
|
system.activationScripts.cgit = ''
|
||||||
|
8
krebs/5pkgs/simple/cgit-clear-cache.nix
Normal file
8
krebs/5pkgs/simple/cgit-clear-cache.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
with import <stockholm/lib>;
|
||||||
|
|
||||||
|
{ cache-root ? "/tmp/cgit", findutils, writeDashBin }:
|
||||||
|
|
||||||
|
writeDashBin "cgit-clear-cache" ''
|
||||||
|
set -efu
|
||||||
|
${findutils}/bin/find ${shell.escape cache-root} -type f -delete
|
||||||
|
''
|
Loading…
Reference in New Issue
Block a user