feat(hydra): add hydra
This commit is contained in:
parent
3aa8d39a3f
commit
169932121f
6 changed files with 88 additions and 22 deletions
49
modules/nixos/sites/hydra/default.nix
Normal file
49
modules/nixos/sites/hydra/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.custom; let
|
||||
cfg = config.sites.hydra;
|
||||
in {
|
||||
options.sites.hydra = with types; {
|
||||
enable = mkBoolOpt false "Enable Hydra";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
hydraURL = "https://hydra.zoeys.computer";
|
||||
useSubstitutes = true;
|
||||
notificationSender = "hydra@localhost"; # e-mail of hydra service
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."hydra.zoeys.computer" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:3000";
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings.allowed-uris = [
|
||||
"github:"
|
||||
"git+https://github.com/"
|
||||
"git+ssh://github.com/"
|
||||
"git+https://git.zoeys.computer/"
|
||||
"git+ssh://git.zoeys.computer/"
|
||||
];
|
||||
|
||||
nix.buildMachines = [
|
||||
{
|
||||
hostName = "localhost";
|
||||
protocol = null;
|
||||
system = "x86_64-linux";
|
||||
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
|
||||
maxJobs = 8;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue