diff --git a/hydra-module.nix b/hydra-module.nix index 37faaf00..b4253478 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -21,6 +21,9 @@ let SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt"; # Remove in 16.03 PGPASSFILE = "${baseDir}/pgpass"; NIX_REMOTE_SYSTEMS = concatStringsSep ":" cfg.buildMachinesFiles; + } // optionalAttrs (cfg.smtpHost != null) { + EMAIL_SENDER_TRANSPORT = "SMTP"; + EMAIL_SENDER_TRANSPORT_host = cfg.smtpHost; } // hydraEnv // cfg.extraEnv; serverEnv = env // @@ -112,6 +115,15 @@ in ''; }; + smtpHost = mkOption { + type = types.nullOr types.str; + default = null; + example = ["localhost"]; + description = '' + Hostname of the SMTP server to use to send email. + ''; + }; + tracker = mkOption { type = types.str; default = "";