diff options
Diffstat (limited to 'lass/2configs/git.nix')
-rw-r--r-- | lass/2configs/git.nix | 63 |
1 files changed, 43 insertions, 20 deletions
diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix index 829e62269..300637ff8 100644 --- a/lass/2configs/git.nix +++ b/lass/2configs/git.nix @@ -23,6 +23,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; @@ -30,6 +34,10 @@ let rules = concatMap make-rules (attrValues repos); public-repos = mapAttrs make-public-repo { + buildbot-classic = { + cgit.desc = "fork of buildbot"; + cgit.section = "software"; + }; cholerab = { cgit.desc = "krebs thesauron & enterprise-patterns"; cgit.section = "documentation"; @@ -38,6 +46,10 @@ let cgit.desc = "take a description of your disk layout and produce a format script"; cgit.section = "software"; }; + krebspage = { + cgit.desc = "homepage of krebs"; + cgit.section = "configuration"; + }; news = { cgit.desc = "take a rss feed and a timeout and print it to stdout"; cgit.section = "software"; @@ -96,15 +108,20 @@ let inherit cgit collaborators name; public = true; hooks = { - post-receive = pkgs.git-hooks.irc-announce { - # TODO make nick = config.krebs.build.host.name the default - nick = config.krebs.build.host.name; - channel = "#xxx"; - server = "irc.r"; - verbose = config.krebs.build.host.name == "prism"; - # TODO define branches in some kind of option per repo - branches = [ "master" ]; - }; + post-receive = '' + ${pkgs.git-hooks.irc-announce { + # TODO make nick = config.krebs.build.host.name the default + nick = config.krebs.build.host.name; + channel = "#xxx"; + # TODO define refs in some kind of option per repo + refs = [ + "refs/heads/master" + ]; + server = "irc.r"; + verbose = config.krebs.build.host.name == "prism"; + }} + ${cgit-clear-cache}/bin/cgit-clear-cache + ''; }; }; @@ -116,16 +133,22 @@ let make-restricted-repo = name: { admins ? [], collaborators ? [], announce ? false, hooks ? {}, ... }: { inherit admins collaborators name; public = false; - hooks = optionalAttrs announce { - post-receive = pkgs.git-hooks.irc-announce { - # TODO make nick = config.krebs.build.host.name the default - nick = config.krebs.build.host.name; - channel = "#xxx"; - server = "irc.r"; - verbose = false; - # TODO define branches in some kind of option per repo - branches = [ "master" "staging*" ]; - }; + hooks = { + post-receive = '' + ${optionalString announce (pkgs.git-hooks.irc-announce { + # TODO make nick = config.krebs.build.host.name the default + nick = config.krebs.build.host.name; + channel = "#xxx"; + # TODO define refs in some kind of option per repo + refs = [ + "refs/heads/master" + "refs/heads/staging*" + ]; + server = "irc.r"; + verbose = false; + })} + ${cgit-clear-cache}/bin/cgit-clear-cache + ''; } // hooks; }; @@ -133,7 +156,7 @@ let with git // config.krebs.users; repo: singleton { - user = [ lass-mors lass-shodan lass-icarus lass-blue ]; + user = [ lass lass-mors lass-shodan lass-icarus lass-blue ]; repo = [ repo ]; perm = push "refs/*" [ non-fast-forward create delete merge ]; } ++ |