1 { config, lib, pkgs, ... }:
6 cfg = config.services.gitweb;
11 options.services.gitweb = {
13 projectroot = mkOption {
16 description = lib.mdDoc ''
17 Path to git projects (bare repositories) that should be served by
18 gitweb. Must not end with a slash.
22 extraConfig = mkOption {
25 description = lib.mdDoc ''
26 Verbatim configuration text appended to the generated gitweb.conf file.
29 $feature{'highlight'}{'default'} = [1];
30 $feature{'ctags'}{'default'} = [1];
31 $feature{'avatar'}{'default'} = ['gravatar'];
35 gitwebTheme = mkOption {
38 description = lib.mdDoc ''
39 Use an alternative theme for gitweb, strongly inspired by GitHub.
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";
50 defaultText = literalMD "generated config file";
58 meta.maintainers = with maintainers; [ ];