host cd: add all public repos
This commit is contained in:
parent
ca7048e27c
commit
959417b490
@ -1,9 +1,66 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (builtins) readFile;
|
||||
inherit (builtins) map readFile;
|
||||
inherit (lib) concatMap listToAttrs;
|
||||
# TODO lib should already include our stuff
|
||||
inherit (import ../../lib { inherit lib pkgs; }) addNames git;
|
||||
|
||||
cd-repos = [
|
||||
(public "cgserver")
|
||||
(public "crude-mail-setup")
|
||||
(public "dot-xmonad")
|
||||
(public "hack")
|
||||
(public "load-env")
|
||||
(public "make-snapshot")
|
||||
(public "mime")
|
||||
(public "much")
|
||||
(public "nixos-infest")
|
||||
(public "nixpkgs")
|
||||
(public "painload")
|
||||
(public "regfish")
|
||||
(public "repo")
|
||||
(public "shitment")
|
||||
(public "wai-middleware-time")
|
||||
(public "web-routes-wai-custom")
|
||||
(public "wu-configuration-nix")
|
||||
];
|
||||
|
||||
users = addNames {
|
||||
tv = { pubkey = readFile <pubkeys/tv.ssh.pub>; };
|
||||
lass = { pubkey = "xxx"; };
|
||||
makefu = { pubkey = "xxx"; };
|
||||
};
|
||||
|
||||
repos = listToAttrs (map ({ repo, ... }: { name = repo.name; value = repo; }) cd-repos);
|
||||
|
||||
rules = concatMap ({ rules, ... }: rules) cd-repos;
|
||||
|
||||
public = repo-name:
|
||||
rec {
|
||||
repo = {
|
||||
name = repo-name;
|
||||
hooks = {
|
||||
post-receive = git.irc-announce {
|
||||
nick = config.networking.hostName; # TODO make this the default
|
||||
channel = "#retiolum";
|
||||
server = "ire.retiolum";
|
||||
};
|
||||
};
|
||||
public = true;
|
||||
};
|
||||
rules = with git; with users; [
|
||||
{ user = tv;
|
||||
repo = [ repo ];
|
||||
perm = push "refs/*" [ non-fast-forward create delete merge ];
|
||||
}
|
||||
{ user = [ lass makefu ];
|
||||
repo = [ repo ];
|
||||
perm = fetch;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
@ -11,49 +68,8 @@ in
|
||||
../tv/git
|
||||
];
|
||||
|
||||
services.git = rec {
|
||||
services.git = {
|
||||
enable = true;
|
||||
|
||||
users = addNames {
|
||||
tv = { pubkey = readFile <pubkeys/tv.ssh.pub>; };
|
||||
lass = { pubkey = "xxx"; };
|
||||
makefu = { pubkey = "xxx"; };
|
||||
};
|
||||
|
||||
repos = addNames {
|
||||
shitment = {
|
||||
desc = "shitment repository";
|
||||
hooks = {
|
||||
post-receive = git.irc-announce {
|
||||
nick = config.networking.hostName; # TODO make this the default
|
||||
channel = "#retiolum";
|
||||
server = "ire.retiolum";
|
||||
};
|
||||
};
|
||||
public = true;
|
||||
};
|
||||
testing = {
|
||||
desc = "testing repository";
|
||||
hooks = {
|
||||
post-receive = git.irc-announce {
|
||||
nick = config.networking.hostName; # TODO make this the default
|
||||
channel = "#retiolum";
|
||||
server = "ire.retiolum";
|
||||
};
|
||||
};
|
||||
public = true;
|
||||
};
|
||||
};
|
||||
|
||||
rules = with git; with users; with repos; [
|
||||
{ user = tv;
|
||||
repo = [ testing shitment ];
|
||||
perm = push "refs/*" [ non-fast-forward create delete merge ];
|
||||
}
|
||||
{ user = [ lass makefu ];
|
||||
repo = [ testing shitment ];
|
||||
perm = fetch;
|
||||
}
|
||||
];
|
||||
inherit repos rules users;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user