summaryrefslogtreecommitdiffstats
path: root/2configs/makefu/cgit-retiolum.nix
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-07-27 10:09:13 +0200
committerlassulus <lass@aidsballs.de>2015-07-27 10:09:13 +0200
commit54a01c0c74bdd4233962d62c4e6631f7f8b50f77 (patch)
tree705a3f8307b49e52bd95ecac8cd6d6ca828921a4 /2configs/makefu/cgit-retiolum.nix
parent6476abd6ac7e000d0759569a1e2754acb2f518ca (diff)
parent3197897292f0fc8f38d30ad6ddc9742be4a7cc1d (diff)
Merge branch 'tv' into master
Diffstat (limited to '2configs/makefu/cgit-retiolum.nix')
-rw-r--r--2configs/makefu/cgit-retiolum.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/2configs/makefu/cgit-retiolum.nix b/2configs/makefu/cgit-retiolum.nix
new file mode 100644
index 000000000..d5ad35fda
--- /dev/null
+++ b/2configs/makefu/cgit-retiolum.nix
@@ -0,0 +1,52 @@
+{ config, lib, pkgs, ... }:
+with import ../../4lib/tv { inherit lib pkgs; };
+let
+
+ out = {
+ imports = [ ../../3modules/krebs/git.nix ];
+ krebs.git = {
+ enable = true;
+ root-title = "public repositories ";
+ root-desc = "keep calm and enrage";
+ inherit repos rules ;
+ };
+ };
+
+ repos = public-repos;
+ rules = concatMap make-rules (attrValues repos);
+
+ public-repos = mapAttrs make-public-repo {
+ stockholm = {
+ desc = "take all the computers hostage, they'll love you!";
+ };
+ };
+
+ # TODO move users to separate module
+
+ make-public-repo = name: { desc ? null, ... }: {
+ inherit name desc;
+ public = true;
+ hooks = {
+ post-receive = git.irc-announce {
+ nick = config.networking.hostName;
+ channel = "#retiolum";
+ server = "cd.retiolum";
+ };
+ };
+ };
+
+ make-rules =
+ with git // config.krebs.users;
+ repo:
+ singleton {
+ user = makefu;
+ repo = [ repo ];
+ perm = push "refs/*" [ non-fast-forward create delete merge ];
+ } ++
+ optional repo.public {
+ user = [ lass tv uriel ];
+ repo = [ repo ];
+ perm = fetch;
+ };
+
+in out