This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / 2configs / git-brain.nix
1.3 kB 58 lines
1{ self, config, lib, pkgs, ... }: 2let 3 git = self.inputs.stockholm.lib.git; 4 repos = krebs-repos; 5 rules = lib.concatMap krebs-rules (lib.attrValues krebs-repos); 6 7 krebs-repos = lib.mapAttrs make-krebs-repo { 8 brain = { }; 9 }; 10 11 12 make-krebs-repo = with git; name: { cgit ? {}, ... }: { 13 inherit cgit name; 14 public = false; 15 hooks = { 16 post-receive = pkgs.git-hooks.irc-announce { 17 nick = config.networking.hostName; 18 verbose = true; 19 channel = "#xxx"; 20 # TODO remove the hardcoded hostname 21 server = "irc.r"; 22 }; 23 }; 24 }; 25 26 27 28 # TODO: get the list of all krebsministers 29 krebsminister = with config.krebs.users; [ makefu tv kmein ]; 30 krebs-rules = repo: 31 set-owners repo [ config.krebs.users.lass ] ++ set-ro-access repo krebsminister; 32 33 set-ro-access = with git; repo: user: 34 lib.singleton { 35 inherit user; 36 repo = [ repo ]; 37 perm = fetch; 38 }; 39 40 set-owners = with git;repo: user: 41 lib.singleton { 42 inherit user; 43 repo = [ repo ]; 44 perm = push "refs/*" [ non-fast-forward create delete merge ]; 45 }; 46 47in { 48 imports = [ 49 self.inputs.stockholm.nixosModules.git 50 ]; 51 krebs.git = { 52 enable = true; 53 cgit = { 54 enable = false; 55 }; 56 inherit repos rules; 57 }; 58}