Update CI server configuration

This commit is contained in:
Vili Sinervä 2025-06-11 20:45:47 +03:00
parent e6eee0029b
commit 3dba050d34
Signed by: Vili Sinervä
SSH key fingerprint: SHA256:FladqYjaE4scJY3Hi+gnShZ6ygnTJgixy0I6BAoHyos
4 changed files with 45 additions and 16 deletions

View file

@ -5,6 +5,7 @@
../../shared/hardware/vm.nix
../../shared/disko/basic-ext4.nix
../../servers/ci.nix
../../servers/forgejo-runner.nix
../../servers/hydra.nix
];
}

View file

@ -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";
};
};
}

41
servers/hydra.nix Normal file
View file

@ -0,0 +1,41 @@
{ ... }:
let
domain = "ci.sinerva.eu";
in
{
imports = [
./utils/nginx-https-server.nix
./utils/acme-http-client.nix
];
services = {
hydra = {
enable = true;
hydraURL = "https://${domain}";
listenHost = "localhost";
notificationSender = "hydra@sinerva.eu";
port = 8080;
useSubstitutes = true;
};
nginx.virtualHosts.${domain}.locations."/" = {
proxyPass = "http://localhost:8080";
};
};
nix.buildMachines = [
{
hostName = "localhost";
protocol = null;
system = "x86_64-linux";
supportedFeatures = [
"kvm"
"nixos-test"
"big-parallel"
"benchmark"
];
maxJobs = 6;
}
];
}