host cd: add services.git
This commit is contained in:
parent
1d22fb2f26
commit
96ea8780a3
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
@ -44,6 +44,40 @@
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.git =
|
||||
let
|
||||
inherit (builtins) readFile;
|
||||
# TODO lib should already include our stuff
|
||||
inherit (import ../../lib { inherit lib; }) addNames git;
|
||||
in
|
||||
rec {
|
||||
enable = true;
|
||||
|
||||
users = addNames {
|
||||
tv = { pubkey = readFile <pubkeys/tv.ssh.pub>; };
|
||||
lass = { pubkey = "xxx"; };
|
||||
makefu = { pubkey = "xxx"; };
|
||||
};
|
||||
|
||||
# TODO warn about stale repodirs
|
||||
repos = addNames {
|
||||
testing = {
|
||||
# TODO hooks = { post-receive = ...
|
||||
};
|
||||
};
|
||||
|
||||
rules = with git; with users; with repos; [
|
||||
{ user = tv;
|
||||
repo = testing;
|
||||
perm = push master [ non-fast-forward create delete merge ];
|
||||
}
|
||||
{ user = [ lass makefu ];
|
||||
repo = testing;
|
||||
perm = fetch;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.journald.extraConfig = ''
|
||||
SystemMaxUse=1G
|
||||
RuntimeMaxUse=128M
|
||||
|
Loading…
Reference in New Issue
Block a user