]> Git — Sourcephile - sourcephile-nix.git/blob - install/logical/friot/gitolite.nix
update
[sourcephile-nix.git] / install / logical / friot / gitolite.nix
1 {pkgs, lib, config, system, ...}:
2 let inherit (builtins.extraBuiltins) pass;
3 inherit (lib) types;
4 inherit (config.services) gitolite;
5 userPass = name: pass ("${config.networking.domain}/${config.networking.hostName}/"+name);
6 gitolite-admin = "julm";
7 in
8 {
9 config = {
10 services = {
11 gitolite = {
12 enable = true;
13 user = "git";
14 group = gitolite.user;
15 adminPubkey = pass "${config.networking.domain}/ssh/${gitolite-admin}";
16 extraGitoliteRc = ''
17 $RC{UMASK} = '0027';
18 $RC{LOG_DEST} = 'repo-log,syslog';
19 $RC{LOG_FACILITY} = 'local0';
20 $RC{GIT_CONFIG_KEYS} = 'hooks.* gitweb.*';
21 $RC{LOCAL_CODE} = "$rc{GL_ADMIN_BASE}/local"
22 if -d "$rc{GL_ADMIN_BASE}/local";
23 push(@{$RC{ENABLE}}, ( 'Alias'
24 , 'cgit'
25 , 'D'
26 , 'Shell ${gitolite-admin}'
27 , 'create'
28 , 'expand-deny-messages'
29 , 'fork'
30 , 'keysubdirs-as-groups'
31 , 'readme'
32 , 'repo-specific-hooks'
33 , 'ssh-authkeys-split'
34 ));
35 '';
36 };
37 };
38 };
39 }