summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authorlassulus <lass@blue.r>2018-09-04 20:40:20 +0200
committerlassulus <lass@blue.r>2018-09-04 20:40:20 +0200
commite183bb1c80c42131f9e3d932985e413ef457f77a (patch)
treef728e5c1a97550d12de72af3a63740ddca69b975 /tv/2configs
parent8760874b7a7a746d5dd0bf179bd41e9e2291bb77 (diff)
parent000f2a7c9123fcd4b110c6c220570758d556c837 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/gitrepos.nix27
1 files changed, 22 insertions, 5 deletions
diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix
index 06875038d..74fb5215a 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 =