Add an option to run the hydra server in debug mode

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2013-07-28 11:11:09 -04:00
parent 10cad61231
commit 0c0cf4113e

View file

@ -28,7 +28,7 @@ let
serverEnv = env //
{ HYDRA_LOGO = if cfg.logo != null then cfg.logo else "";
HYDRA_TRACKER = cfg.tracker;
};
} // (optionalAttrs cfg.debugMode { DBIC_TRACE = 1; });
in
{
@ -112,6 +112,12 @@ in
'';
};
debugServer = mkOption {
default = false;
type = types.bool;
description = "Whether to run the server in debug mode";
};
};
};
@ -189,7 +195,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";
{ ExecStart = "@${cfg.hydra}/bin/hydra-server hydra-server -f -h \* --max_spare_servers 5 --max_servers 25 --max_requests 100${optionalString cfg.debugServer " -d"}";
User = "hydra";
Restart = "always";
};