at 23.11-pre 1.4 kB view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5let 6 cfg = config.services.gitweb; 7 8in 9{ 10 11 options.services.gitweb = { 12 13 projectroot = mkOption { 14 default = "/srv/git"; 15 type = types.path; 16 description = lib.mdDoc '' 17 Path to git projects (bare repositories) that should be served by 18 gitweb. Must not end with a slash. 19 ''; 20 }; 21 22 extraConfig = mkOption { 23 default = ""; 24 type = types.lines; 25 description = lib.mdDoc '' 26 Verbatim configuration text appended to the generated gitweb.conf file. 27 ''; 28 example = '' 29 $feature{'highlight'}{'default'} = [1]; 30 $feature{'ctags'}{'default'} = [1]; 31 $feature{'avatar'}{'default'} = ['gravatar']; 32 ''; 33 }; 34 35 gitwebTheme = mkOption { 36 default = false; 37 type = types.bool; 38 description = lib.mdDoc '' 39 Use an alternative theme for gitweb, strongly inspired by GitHub. 40 ''; 41 }; 42 43 gitwebConfigFile = mkOption { 44 default = pkgs.writeText "gitweb.conf" '' 45 # path to git projects (<project>.git) 46 $projectroot = "${cfg.projectroot}"; 47 $highlight_bin = "${pkgs.highlight}/bin/highlight"; 48 ${cfg.extraConfig} 49 ''; 50 defaultText = literalMD "generated config file"; 51 type = types.path; 52 readOnly = true; 53 internal = true; 54 }; 55 56 }; 57 58 meta.maintainers = with maintainers; [ ]; 59 60}