1 { pkgs, lib, config, hostName, ... }:
3 inherit (config.users) users;
4 gitolite-admin = "julm";
7 environment.systemPackages = [ pkgs.gitolite ];
11 group = users."git".name;
12 adminPubkey = lib.concatStringsSep "\n" users.${gitolite-admin}.openssh.authorizedKeys.keys;
14 $RC{UMASK} = 0027; # NOTE: no quote around in Perl, so it's octal
15 $RC{LOG_DEST} = 'repo-log,syslog';
16 $RC{LOG_FACILITY} = 'local0';
17 #$RC{GIT_CONFIG_KEYS} = 'hooks.* gitweb.*';
18 $RC{GIT_CONFIG_KEYS} = '.*';
19 #$RC{LOCAL_CODE} = "$rc{GL_ADMIN_BASE}/local"
20 # if -d "$rc{GL_ADMIN_BASE}/local";
21 $RC{LOCAL_CODE} = "$ENV{HOME}/local";
22 push(@{$RC{ENABLE}}, ( 'Alias'
24 # NOTE: without this "cgit" option,
25 # the repositories' "description" files are not modified
27 , 'Shell ${gitolite-admin}'
29 , 'expand-deny-messages'
31 , 'keysubdirs-as-groups'
33 , (-d "$ENV{HOME}/local" ? 'repo-specific-hooks' : ())
34 , 'ssh-authkeys-split'
38 fileSystems."/var/lib/gitolite" = {
39 device = "${hostName}/var/git";
42 services.sanoid.datasets."${hostName}/var/git" = {
43 use_template = [ "snap" ];
48 package = pkgs.gitMinimal;
50 init.defaultBranch = "main";