diff --git a/hosts/ci/configuration.nix b/hosts/ci/configuration.nix index f24380b..e7fdc97 100644 --- a/hosts/ci/configuration.nix +++ b/hosts/ci/configuration.nix @@ -5,6 +5,7 @@ ../../shared/hardware/vm.nix ../../shared/disko/basic-ext4.nix - ../../servers/ci.nix + ../../servers/forgejo-runner.nix + ../../servers/hydra.nix ]; } diff --git a/servers/ci.nix b/servers/forgejo-runner.nix similarity index 100% rename from servers/ci.nix rename to servers/forgejo-runner.nix diff --git a/servers/forgejo.nix b/servers/forgejo.nix index 07c4ef6..efb5458 100644 --- a/servers/forgejo.nix +++ b/servers/forgejo.nix @@ -46,21 +46,8 @@ }; }; - nginx = { - enable = true; - recommendedGzipSettings = true; - recommendedOptimisation = true; - recommendedTlsSettings = true; - recommendedProxySettings = true; - - virtualHosts.${config.services.forgejo.settings.server.DOMAIN} = { - enableACME = true; - forceSSL = true; - kTLS = true; - locations."/" = { - proxyPass = "http://localhost:8000"; - }; - }; + nginx.virtualHosts.${config.services.forgejo.settings.server.DOMAIN}.locations."/" = { + proxyPass = "http://localhost:8000"; }; }; } diff --git a/servers/hydra.nix b/servers/hydra.nix new file mode 100644 index 0000000..07966cc --- /dev/null +++ b/servers/hydra.nix @@ -0,0 +1,41 @@ +{ config, ... }: +{ + imports = [ + ./utils/nginx-https-server.nix + ./utils/acme-http-client.nix + ]; + + services = { + hydra = { + enable = true; + hydraURL = "https://ci.sinerva.eu/"; + listenHost = "::1"; + notificationSender = "hydra@sinerva.eu"; + port = 8080; + useSubstitutes = true; + + extraConfig = ""; + extraEnv = ""; + }; + + nginx.virtualHosts.${config.services.hydra.hydraURL}.locations."/" = { + proxyPass = "http://localhost:8080"; + }; + }; + + nix.buildMachines = [ + { + hostName = "localhost"; + protocol = null; + system = "x86_64-linux"; + supportedFeatures = [ + "kvm" + "nixos-test" + "big-parallel" + "benchmark" + ]; + maxJobs = 6; + } + ]; + +}