From 15b474ae05881eff78f0cbd166ac5be8c43a27ce Mon Sep 17 00:00:00 2001 From: Vivek Revankar Date: Wed, 4 Sep 2024 22:28:40 -0700 Subject: [PATCH] nixos/endlessh-go: allow overriding package allow overriding the endlessh-go package used in the service --- nixos/modules/services/security/endlessh-go.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/security/endlessh-go.nix b/nixos/modules/services/security/endlessh-go.nix index 480bfc8cb9ef..1c5d2087f0b3 100644 --- a/nixos/modules/services/security/endlessh-go.nix +++ b/nixos/modules/services/security/endlessh-go.nix @@ -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}"