mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
nixos/cgit: add package option
This commit is contained in:
parent
218c7795a6
commit
45f06d9712
2 changed files with 20 additions and 4 deletions
|
@ -100,6 +100,8 @@ in
|
|||
options = {
|
||||
enable = mkEnableOption (mdDoc "cgit");
|
||||
|
||||
package = mkPackageOptionMD pkgs "cgit" {};
|
||||
|
||||
nginx.virtualHost = mkOption {
|
||||
description = mdDoc "VirtualHost to serve cgit on, defaults to the attribute name.";
|
||||
type = types.str;
|
||||
|
@ -172,7 +174,7 @@ in
|
|||
[ "cgit.css" "cgit.png" "favicon.ico" "robots.txt" ]
|
||||
(name: nameValuePair "= ${stripLocation cfg}/${name}" {
|
||||
extraConfig = ''
|
||||
alias ${pkgs.cgit}/cgit/${name};
|
||||
alias ${cfg.package}/cgit/${name};
|
||||
'';
|
||||
})
|
||||
) // {
|
||||
|
@ -187,7 +189,7 @@ in
|
|||
};
|
||||
"${stripLocation cfg}/" = {
|
||||
fastcgiParams = {
|
||||
SCRIPT_FILENAME = "${pkgs.cgit}/cgit/cgit.cgi";
|
||||
SCRIPT_FILENAME = "${cfg.package}/cgit/cgit.cgi";
|
||||
QUERY_STRING = "$args";
|
||||
HTTP_HOST = "$server_name";
|
||||
CGIT_CONFIG = mkCgitrc cfg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue