nixos-config/modules/server/hydra.nix

30 lines
699 B
Nix

{ config, lib, extraInfo, ... }:
with lib;
{
options.server.builder.enableHydra = mkOption {
type = types.bool;
default = false;
example = true;
};
config = mkIf config.server.builder.enableHydra {
services.hydra = {
enable = true;
hydraURL = "http://localhost:3000";
notificationSender = "hydra@localhost";
buildMachinesFiles = [ ];
useSubstitutes = true;
};
services.nginx.virtualHosts.${extraInfo.hydraURI} = mkIf config.services.nginx.enable {
enableACME = true;
forceSSL = true;
locations."/" = {
recommendedProxySettings = true;
proxyPass = config.services.hydra.hydraURL;
};
};
};
}