nixos/endlessh-go: allow overriding package (#339459)

This commit is contained in:
Azat Bahawi 2024-09-05 07:48:21 +00:00 committed by GitHub
commit 187f4340c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,6 +9,8 @@ in
options.services.endlessh-go = {
enable = mkEnableOption "endlessh-go service";
package = mkPackageOption pkgs "endlessh-go" { };
listenAddress = mkOption {
type = types.str;
default = "0.0.0.0";
@ -86,7 +88,7 @@ in
{
Restart = "always";
ExecStart = with cfg; concatStringsSep " " ([
"${pkgs.endlessh-go}/bin/endlessh-go"
(lib.getExe cfg.package)
"-logtostderr"
"-host=${listenAddress}"
"-port=${toString port}"