From da5824e11cf3c6bd7bc52435fd9b1363891f49e1 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 29 Aug 2013 00:20:51 +0200 Subject: [PATCH] hydra-module: Allow to specify the listen host. It's currently possible to specify the port but not the address or interface you want to listen on. Signed-off-by: aszlig --- hydra-module.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hydra-module.nix b/hydra-module.nix index 8b940031..a796663d 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -58,6 +58,15 @@ in ''; }; + listenHost = mkOption { + default = "*"; + example = "localhost"; + description = '' + The hostname or address to listen on or * to listen + on all interfaces. + ''; + }; + port = mkOption { default = 3000; description = '' @@ -202,7 +211,7 @@ in after = [ "hydra-init.service" ]; environment = serverEnv; serviceConfig = - { ExecStart = "@${cfg.hydra}/bin/hydra-server hydra-server -f -h \* --max_spare_servers 5 --max_servers 25 --max_requests 100${optionalString cfg.debugServer " -d"}"; + { ExecStart = "@${cfg.hydra}/bin/hydra-server hydra-server -f -h '${cfg.listenHost}' --max_spare_servers 5 --max_servers 25 --max_requests 100${optionalString cfg.debugServer " -d"}"; User = "hydra"; Restart = "always"; };