flake/modules/services/hydra.nix
2025-07-27 15:48:31 +03:00

30 lines
660 B
Nix

{
config,
lib,
...
}:
{
options = {
myModules.enableHydra = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable Hydra continuous integration server";
};
};
config = lib.mkMerge [
(lib.mkIf config.myModules.enableHydra {
services.hydra = {
enable = true;
port = 3000;
hydraURL = "http://localhost:${toString config.services.hydra.port}";
notificationSender = "hydra@localhost";
buildMachinesFiles = [];
useSubstitutes = true;
};
networking.firewall.allowedTCPPorts = [
config.services.hydra.port
];
})
];
}