mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
nixos/gitDaemon: add package option
This commit is contained in:
parent
3f99d04a16
commit
ecddd99c6a
@ -27,6 +27,8 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "git" { };
|
||||
|
||||
basePath = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
@ -119,7 +121,7 @@ in
|
||||
systemd.services.git-daemon = {
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
script = "${pkgs.git}/bin/git daemon --reuseaddr "
|
||||
script = "${getExe cfg.package} daemon --reuseaddr "
|
||||
+ (optionalString (cfg.basePath != "") "--base-path=${cfg.basePath} ")
|
||||
+ (optionalString (cfg.listenAddress != "") "--listen=${cfg.listenAddress} ")
|
||||
+ "--port=${toString cfg.port} --user=${cfg.user} --group=${cfg.group} ${cfg.options} "
|
||||
|
Loading…
Reference in New Issue
Block a user