1 { config, lib, pkgs, ... }:
3 cfg = config.services.gitweb;
8 options.services.gitweb = {
10 projectroot = lib.mkOption {
12 type = lib.types.path;
14 Path to git projects (bare repositories) that should be served by
15 gitweb. Must not end with a slash.
19 extraConfig = lib.mkOption {
21 type = lib.types.lines;
23 Verbatim configuration text appended to the generated gitweb.conf file.
26 $feature{'highlight'}{'default'} = [1];
27 $feature{'ctags'}{'default'} = [1];
28 $feature{'avatar'}{'default'} = ['gravatar'];
32 gitwebTheme = lib.mkOption {
34 type = lib.types.bool;
36 Use an alternative theme for gitweb, strongly inspired by GitHub.
40 gitwebConfigFile = lib.mkOption {
41 default = pkgs.writeText "gitweb.conf" ''
42 # path to git projects (<project>.git)
43 $projectroot = "${cfg.projectroot}";
44 $highlight_bin = "${pkgs.highlight}/bin/highlight";
47 defaultText = lib.literalMD "generated config file";
48 type = lib.types.path;
55 meta.maintainers = [ ];