From 0c0cf4113e1ac5238f4461b400da5431bb846e38 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sun, 28 Jul 2013 11:11:09 -0400 Subject: [PATCH] Add an option to run the hydra server in debug mode Signed-off-by: Shea Levy --- hydra-module.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hydra-module.nix b/hydra-module.nix index d6b3de4b..9b2cdffb 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -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"; };