From d710c1e4438623baeb0e910a928fe0604935ce63 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 6 Nov 2013 17:27:36 +0100 Subject: [PATCH] hydra-module.nix: Fix setting the logo --- hydra-module.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hydra-module.nix b/hydra-module.nix index 56d705a7..146df7af 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -19,14 +19,14 @@ let }; serverEnv = env // - { HYDRA_LOGO = if cfg.logo != null then cfg.logo else ""; - HYDRA_TRACKER = cfg.tracker; + { HYDRA_TRACKER = cfg.tracker; } // (optionalAttrs cfg.debugServer { DBIC_TRACE = 1; }); in { ###### interface options = { + services.hydra = rec { enable = mkOption { @@ -109,7 +109,7 @@ in }; logo = mkOption { - type = types.nullOr types.str; + type = types.nullOr types.path; default = null; description = '' File name of an alternate logo to be displayed on the web pages. @@ -135,12 +135,16 @@ in ###### implementation config = mkIf cfg.enable { + services.hydra.extraConfig = '' using_frontend_proxy 1 base_uri ${cfg.hydraURL} notification_sender ${cfg.notificationSender} max_servers 25 + ${optionalString (cfg.logo != null) '' + hydra_logo ${cfg.logo} + ''} ''; environment.systemPackages = [ cfg.package ];