From c476d13586b641b3024d607e971d73946ac73e11 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sun, 22 Sep 2013 19:20:09 -0400 Subject: [PATCH] hydra-module.nix: Make it possible to add extra config lines Signed-off-by: Shea Levy --- hydra-module.nix | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/hydra-module.nix b/hydra-module.nix index 7a666a56..8b940031 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -7,13 +7,7 @@ let baseDir = "/var/lib/hydra"; - hydraConf = pkgs.writeScript "hydra.conf" - '' - using_frontend_proxy 1 - base_uri ${cfg.hydraURL} - notification_sender ${cfg.notificationSender} - max_servers 25 - ''; + hydraConf = pkgs.writeScript "hydra.conf" cfg.extraConfig; env = { NIX_REMOTE = "daemon"; @@ -118,6 +112,11 @@ in description = "Whether to run the server in debug mode"; }; + extraConfig = mkOption { + type = types.lines; + description = "Extra lines for the hydra config"; + }; + }; }; @@ -126,6 +125,14 @@ in ###### implementation config = mkIf cfg.enable { + services.hydra.extraConfig = + '' + using_frontend_proxy 1 + base_uri ${cfg.hydraURL} + notification_sender ${cfg.notificationSender} + max_servers 25 + ''; + environment.systemPackages = [ cfg.hydra ]; users.extraUsers.hydra =