]> Git — Sourcephile - sourcephile-nix.git/blob - install/logical/friot/gitolite.nix
gitolite: add to environment.systemPackages for convenience.
[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 environment.systemPackages = [ pkgs.gitolite ];
11 # NOTE: make confortable to call gitolite from a shell
12
13 services = {
14 gitolite = {
15 enable = true;
16 user = "git";
17 group = gitolite.user;
18 adminPubkey = pass "${config.networking.domain}/ssh/${gitolite-admin}";
19 extraGitoliteRc = ''
20 $RC{UMASK} = '0027';
21 $RC{LOG_DEST} = 'repo-log,syslog';
22 $RC{LOG_FACILITY} = 'local0';
23 $RC{GIT_CONFIG_KEYS} = 'hooks.* gitweb.*';
24 $RC{LOCAL_CODE} = "$rc{GL_ADMIN_BASE}/local"
25 if -d "$rc{GL_ADMIN_BASE}/local";
26 push(@{$RC{ENABLE}}, ( 'Alias'
27 #, 'cgit'
28 , 'D'
29 , 'Shell ${gitolite-admin}'
30 , 'create'
31 , 'expand-deny-messages'
32 , 'fork'
33 , 'keysubdirs-as-groups'
34 , 'readme'
35 , 'repo-specific-hooks'
36 , 'ssh-authkeys-split'
37 ));
38 '';
39 };
40 };
41 };
42 }