diff options
| author | makefu <github@syntax-fehler.de> | 2018-09-08 18:53:49 +0200 |
|---|---|---|
| committer | makefu <github@syntax-fehler.de> | 2018-09-08 18:53:49 +0200 |
| commit | be93f44a4c043f3b5177ee4fb971956677ae30ea (patch) | |
| tree | 71006153c7a728490bfd03c291549063381835b0 /tv | |
| parent | 932ce82229626eb82c01c92a1c9ae5a161dc7970 (diff) | |
| parent | af9935950e251c1c61139ac85080805ba29632b4 (diff) | |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'tv')
| -rw-r--r-- | tv/2configs/gitrepos.nix | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index 0687503..74fb521 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -18,6 +18,10 @@ let { }; }; + cgit-clear-cache = pkgs.cgit-clear-cache.override { + inherit (config.krebs.git.cgit.settings) cache-root; + }; + repos = public-repos // optionalAttrs config.krebs.build.host.secure restricted-repos; @@ -97,8 +101,11 @@ let { { brain = { collaborators = with config.krebs.users; [ lass makefu ]; - hooks.post-receive = irc-announce { - cgit_endpoint = null; + hooks = { + post-receive = /* sh */ '' + (${irc-announce { cgit_endpoint = null; }}) + ${cgit-clear-cache}/bin/cgit-clear-cache + ''; }; }; } // @@ -117,14 +124,24 @@ let { make-public-repo = name: { cgit ? {}, ... }: { inherit cgit name; public = true; - hooks = optionalAttrs (config.krebs.build.host.name == "ni") { - post-receive = irc-announce {}; + hooks = { + post-receive = /* sh */ '' + (${optionalString (config.krebs.build.host.name == "ni") + (irc-announce {})}) + ${cgit-clear-cache}/bin/cgit-clear-cache + ''; }; }; make-restricted-repo = name: { collaborators ? [], hooks ? {}, ... }: { - inherit collaborators hooks name; + inherit collaborators name; public = false; + hooks = hooks // { + post-receive = /* sh */ '' + (${hooks.post-receive or ""}) + ${cgit-clear-cache}/bin/cgit-clear-cache + ''; + }; }; make-rules = |
