From 76a7cdc897e16fa95e886c6a45775a9e6a8614a6 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Wed, 30 Apr 2014 11:54:45 -0500 Subject: [PATCH] hydra-module: add config.extraEnv This makes it easy to set environment variables for the Hydra server (for example, your configuration.nix can use readFile to read an API token to upload build results somewhere). Signed-off-by: Austin Seipp --- hydra-module.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hydra-module.nix b/hydra-module.nix index 3833fb80..672b2617 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -19,7 +19,7 @@ let { NIX_REMOTE = "daemon"; OPENSSL_X509_CERT_FILE = "/etc/ssl/certs/ca-bundle.crt"; GIT_SSL_CAINFO = "/etc/ssl/certs/ca-bundle.crt"; - } // hydraEnv; + } // hydraEnv // cfg.extraEnv; serverEnv = env // { HYDRA_TRACKER = cfg.tracker; @@ -130,6 +130,11 @@ in description = "Extra lines for the hydra config"; }; + extraEnv = mkOption { + type = types.attrsOf types.str; + default = {}; + description = "Extra environment variables for Hydra"; + }; }; };