hydra-module.nix: Export the HYDRA_* environment variables

This is useful if you want to run hydra-* commands manually.
This commit is contained in:
Eelco Dolstra 2013-11-06 17:32:50 +01:00
parent ed9d57d0a4
commit 8b67ad8787

View file

@ -9,14 +9,17 @@ let
hydraConf = pkgs.writeScript "hydra.conf" cfg.extraConfig; hydraConf = pkgs.writeScript "hydra.conf" cfg.extraConfig;
env = hydraEnv =
{ NIX_REMOTE = "daemon"; { HYDRA_DBI = cfg.dbi;
HYDRA_DBI = cfg.dbi;
HYDRA_CONFIG = "${baseDir}/data/hydra.conf"; HYDRA_CONFIG = "${baseDir}/data/hydra.conf";
HYDRA_DATA = "${baseDir}/data"; HYDRA_DATA = "${baseDir}/data";
};
env =
{ NIX_REMOTE = "daemon";
OPENSSL_X509_CERT_FILE = "/etc/ssl/certs/ca-bundle.crt"; OPENSSL_X509_CERT_FILE = "/etc/ssl/certs/ca-bundle.crt";
GIT_SSL_CAINFO = "/etc/ssl/certs/ca-bundle.crt"; GIT_SSL_CAINFO = "/etc/ssl/certs/ca-bundle.crt";
}; } // hydraEnv;
serverEnv = env // serverEnv = env //
{ HYDRA_TRACKER = cfg.tracker; { HYDRA_TRACKER = cfg.tracker;
@ -149,6 +152,8 @@ in
environment.systemPackages = [ cfg.package ]; environment.systemPackages = [ cfg.package ];
environment.variables = hydraEnv;
users.extraUsers.hydra = users.extraUsers.hydra =
{ description = "Hydra"; { description = "Hydra";
home = baseDir; home = baseDir;