mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
6afb255d97
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
61 lines
1.3 KiB
Nix
61 lines
1.3 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.services.gitweb;
|
|
|
|
in
|
|
{
|
|
|
|
options.services.gitweb = {
|
|
|
|
projectroot = mkOption {
|
|
default = "/srv/git";
|
|
type = types.path;
|
|
description = ''
|
|
Path to git projects (bare repositories) that should be served by
|
|
gitweb. Must not end with a slash.
|
|
'';
|
|
};
|
|
|
|
extraConfig = mkOption {
|
|
default = "";
|
|
type = types.lines;
|
|
description = ''
|
|
Verbatim configuration text appended to the generated gitweb.conf file.
|
|
'';
|
|
example = ''
|
|
$feature{'highlight'}{'default'} = [1];
|
|
$feature{'ctags'}{'default'} = [1];
|
|
$feature{'avatar'}{'default'} = ['gravatar'];
|
|
'';
|
|
};
|
|
|
|
gitwebTheme = mkOption {
|
|
default = false;
|
|
type = types.bool;
|
|
description = ''
|
|
Use an alternative theme for gitweb, strongly inspired by GitHub.
|
|
'';
|
|
};
|
|
|
|
gitwebConfigFile = mkOption {
|
|
default = pkgs.writeText "gitweb.conf" ''
|
|
# path to git projects (<project>.git)
|
|
$projectroot = "${cfg.projectroot}";
|
|
$highlight_bin = "${pkgs.highlight}/bin/highlight";
|
|
${cfg.extraConfig}
|
|
'';
|
|
defaultText = literalMD "generated config file";
|
|
type = types.path;
|
|
readOnly = true;
|
|
internal = true;
|
|
};
|
|
|
|
};
|
|
|
|
meta.maintainers = with maintainers; [ ];
|
|
|
|
}
|