1
0
Fork 0
forked from emily/nixfiles
nixfiles-emily/config/services/hydra/nix-config.nix
2024-08-21 21:49:00 +02:00

75 lines
3.2 KiB
Nix

{ config, lib, ... }: {
nix.buildMachines = [
{
hostName = "localhost";
protocol = null;
maxJobs = 0;
speedFactor = 0;
systems = [ "x86_64-linux" ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
}
{
hostName = "integra.kyouma.net";
sshUser = "build";
maxJobs = 2;
speedFactor = 4;
systems = [ "aarch64-linux" ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
}
] ++ lib.forEach [ "03" "04" ] (num: {
hostName = "build-worker-${num}.nyantec.com";
sshUser = "nix-ssh";
maxJobs = 4;
speedFactor = 18;
systems = [ "x86_64-linux" "riscv64-linux" ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-x86-64" "gccarch-x86-64-v2" "gccarch-x86-64-v3" ];
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
}
) ++ lib.forEach [ "01" "02" "03" "04" ] (num: {
hostName = "build-worker-${num}";
sshUser = "root";
maxJobs = 6;
speedFactor = 20;
systems = [ "x86_64-linux" ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-x86-64" "gccarch-x86-64-v2" "gccarch-x86-64-v3" ];
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
});
nix.settings = {
allowed-uris = [
"github:"
"git+https://"
"git+ssh://"
"https://"
];
};
users.users.hydra-queue-runner.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE/vCXM3IaxJP9v2Y+xcQrQD2IcffgdzqtWhpMjj9Xl5 hydra@seras"
];
programs.ssh = {
knownHosts = {
"build-worker-03.nyantec.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEGqTY74c5g15DSNPNM2Wdr5jAwS7BFgX1XRnhtGOnJc";
"build-worker-04.nyantec.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICOq+5I+nlAN2lJoOtoXrYEDuZ/TMPMa43pIlablYigK";
"integra.kyouma.net".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBwEQiSfaDrUAwgul4mktusBPcIVxI4pLNDh9DPopVU";
"localhost".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPNVavo3YHVsrYwXRVISu7kDoknn+5inFGySn4azlB8P";
"[build-worker-kyoumanet.fly.dev]:2201".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDL2M97UBHg9aUfjDUxzmzg1r0ga0m3/stummBVwuEAB";
"[build-worker-kyoumanet.fly.dev]:2202".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOTwVKL0P0chPM2Gz23rbT94844+w1CGJdCaZdzfjThz";
"[build-worker-kyoumanet.fly.dev]:2203".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAjy2eZGJQeAYy0+fLgW9jiS0jVY2LInY0NDMnzCvvKp";
"[build-worker-kyoumanet.fly.dev]:2204".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN72OyD9LYy4hq0WZ7ie5RPV+G54UreEJiA/RubjGoe9";
};
extraConfig = ''
Host build-worker-01
Hostname build-worker-kyoumanet.fly.dev
Port 2201
Host build-worker-02
Hostname build-worker-kyoumanet.fly.dev
Port 2202
Host build-worker-03
Hostname build-worker-kyoumanet.fly.dev
Port 2203
Host build-worker-04
Hostname build-worker-kyoumanet.fly.dev
Port 2204
'';
};
}