forked from lix-project/hydra
hydra-module.nix: Make it possible to add extra config lines
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
98c9559bf2
commit
c476d13586
|
@ -7,13 +7,7 @@ let
|
||||||
|
|
||||||
baseDir = "/var/lib/hydra";
|
baseDir = "/var/lib/hydra";
|
||||||
|
|
||||||
hydraConf = pkgs.writeScript "hydra.conf"
|
hydraConf = pkgs.writeScript "hydra.conf" cfg.extraConfig;
|
||||||
''
|
|
||||||
using_frontend_proxy 1
|
|
||||||
base_uri ${cfg.hydraURL}
|
|
||||||
notification_sender ${cfg.notificationSender}
|
|
||||||
max_servers 25
|
|
||||||
'';
|
|
||||||
|
|
||||||
env =
|
env =
|
||||||
{ NIX_REMOTE = "daemon";
|
{ NIX_REMOTE = "daemon";
|
||||||
|
@ -118,6 +112,11 @@ in
|
||||||
description = "Whether to run the server in debug mode";
|
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
|
###### implementation
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
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 ];
|
environment.systemPackages = [ cfg.hydra ];
|
||||||
|
|
||||||
users.extraUsers.hydra =
|
users.extraUsers.hydra =
|
||||||
|
|
Loading…
Reference in a new issue