From 8b67ad87872726b7e7ec3face1328bb913795651 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 6 Nov 2013 17:32:50 +0100 Subject: [PATCH] hydra-module.nix: Export the HYDRA_* environment variables This is useful if you want to run hydra-* commands manually. --- hydra-module.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hydra-module.nix b/hydra-module.nix index a667bd4d..8034ef77 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -9,14 +9,17 @@ let hydraConf = pkgs.writeScript "hydra.conf" cfg.extraConfig; - env = - { NIX_REMOTE = "daemon"; - HYDRA_DBI = cfg.dbi; + hydraEnv = + { HYDRA_DBI = cfg.dbi; HYDRA_CONFIG = "${baseDir}/data/hydra.conf"; HYDRA_DATA = "${baseDir}/data"; + }; + + env = + { NIX_REMOTE = "daemon"; OPENSSL_X509_CERT_FILE = "/etc/ssl/certs/ca-bundle.crt"; GIT_SSL_CAINFO = "/etc/ssl/certs/ca-bundle.crt"; - }; + } // hydraEnv; serverEnv = env // { HYDRA_TRACKER = cfg.tracker; @@ -149,6 +152,8 @@ in environment.systemPackages = [ cfg.package ]; + environment.variables = hydraEnv; + users.extraUsers.hydra = { description = "Hydra"; home = baseDir;