nixos/gitolite: add enableGitAnnex option

authored by Pavel Goran and committed by Bjørn Forsman cee657f9 b241bcf3

+18 -1
+18 -1
nixos/modules/services/misc/gitolite.nix
··· 41 ''; 42 }; 43 44 commonHooks = mkOption { 45 type = types.listOf types.path; 46 default = []; ··· 75 will need to take any customizations you may have in 76 <literal>~/.gitolite.rc</literal>, convert them to appropriate Perl 77 statements, add them to this option, and remove the file. 78 ''; 79 }; 80 ··· 124 ''} >>"$out/gitolite.rc" 125 ''; 126 in { 127 users.extraUsers.${cfg.user} = { 128 description = "Gitolite user"; 129 home = cfg.dataDir; ··· 198 ''; 199 }; 200 201 - environment.systemPackages = [ pkgs.gitolite pkgs.git ]; 202 }); 203 }
··· 41 ''; 42 }; 43 44 + enableGitAnnex = mkOption { 45 + type = types.bool; 46 + default = false; 47 + description = '' 48 + Enable git-annex support. Uses the <literal>extraGitoliteRc</literal> option 49 + to apply the necessary configuration. 50 + ''; 51 + }; 52 + 53 commonHooks = mkOption { 54 type = types.listOf types.path; 55 default = []; ··· 84 will need to take any customizations you may have in 85 <literal>~/.gitolite.rc</literal>, convert them to appropriate Perl 86 statements, add them to this option, and remove the file. 87 + 88 + See also the <literal>enableGitAnnex</literal> option. 89 ''; 90 }; 91 ··· 135 ''} >>"$out/gitolite.rc" 136 ''; 137 in { 138 + services.gitolite.extraGitoliteRc = optionalString cfg.enableGitAnnex '' 139 + # Enable git-annex support: 140 + push( @{$RC{ENABLE}}, 'git-annex-shell ua'); 141 + ''; 142 + 143 users.extraUsers.${cfg.user} = { 144 description = "Gitolite user"; 145 home = cfg.dataDir; ··· 214 ''; 215 }; 216 217 + environment.systemPackages = [ pkgs.gitolite pkgs.git ] 218 + ++ optional cfg.enableGitAnnex pkgs.gitAndTools.git-annex; 219 }); 220 }