nixos-config/modules/server/hydra.nix

27 lines
627 B
Nix

{ config, lib, ... }:
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.localhost = mkIf config.services.nginx.enable {
locations."/" = {
recommendedProxySettings = true;
proxyPass = config.services.hydra.hydraURL;
};
};
};
}