2024-08-21 21:37:19 +02:00
|
|
|
{ config, lib, ... }: {
|
2024-10-23 12:50:16 +02:00
|
|
|
nix.buildMachines = let
|
|
|
|
base = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
2024-11-29 16:42:11 +01:00
|
|
|
x86-64 = [ "gccarch-x86-64" "gccarch-x86-64-v2" "gccarch-x86-64-v3" ];
|
|
|
|
aarch64 = [ "gccarch-armv8-a" "gccarch-armv8.1-a" "gccarch-armv8.2-a" "gccarch-armv8.2-a+fp16+rcpc+dotprod" ];
|
|
|
|
riscv64 = [ "gccarch-rv64imac" "gccarch-rv64imacfd" "gccarch-rv64gc" ];
|
2024-10-23 12:50:16 +02:00
|
|
|
in [
|
2024-05-11 16:02:39 +02:00
|
|
|
{
|
|
|
|
hostName = "localhost";
|
2024-08-21 21:37:19 +02:00
|
|
|
protocol = null;
|
|
|
|
maxJobs = 0;
|
|
|
|
speedFactor = 0;
|
2024-05-13 12:17:37 +02:00
|
|
|
systems = [ "x86_64-linux" ];
|
2024-10-23 12:50:16 +02:00
|
|
|
supportedFeatures = base;
|
2024-05-11 16:02:39 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
hostName = "integra.kyouma.net";
|
2024-09-05 14:46:07 +02:00
|
|
|
sshUser = "nix-ssh";
|
2024-08-01 15:33:55 +02:00
|
|
|
maxJobs = 2;
|
2024-12-10 11:46:27 +01:00
|
|
|
speedFactor = 24;
|
2024-05-13 12:17:37 +02:00
|
|
|
systems = [ "aarch64-linux" ];
|
2024-12-11 14:35:06 +01:00
|
|
|
supportedFeatures = base ++ aarch64 ++ [ "aarch64-linux-native" ];
|
2024-05-14 14:17:53 +02:00
|
|
|
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
|
2024-05-11 16:02:39 +02:00
|
|
|
}
|
2024-10-10 18:06:11 +02:00
|
|
|
{
|
2024-10-23 12:50:16 +02:00
|
|
|
hostName = "schrodinger.kyouma.net";
|
|
|
|
sshUser = "root";
|
2024-12-11 14:16:31 +01:00
|
|
|
maxJobs = 2;
|
2024-10-23 12:50:16 +02:00
|
|
|
speedFactor = 20;
|
|
|
|
systems = [ "riscv64-linux" ];
|
2024-12-11 14:35:06 +01:00
|
|
|
supportedFeatures = base ++ riscv64 ++ [ "riscv64-linux-native" ];
|
2024-07-23 14:13:39 +02:00
|
|
|
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
|
|
|
|
}
|
2024-11-21 00:51:39 +01:00
|
|
|
] ++ lib.forEach (lib.range 0 11) (num: {
|
|
|
|
hostName = "build-worker-${lib.fixedWidthNumber 2 num}";
|
2024-08-21 21:37:19 +02:00
|
|
|
sshUser = "root";
|
2024-10-10 21:43:11 +02:00
|
|
|
maxJobs = 2;
|
2024-08-21 21:37:19 +02:00
|
|
|
speedFactor = 20;
|
2024-11-29 16:42:11 +01:00
|
|
|
systems = [ "i686-linux" "x86_64-linux" ]
|
|
|
|
++ lib.optionals (lib.mod num 5 == 0) [ "aarch64-linux" "riscv64-linux" ];
|
|
|
|
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" ] ++ x86-64
|
2024-12-11 14:35:06 +01:00
|
|
|
++ lib.optionals (lib.mod num 5 == 0) (aarch64 ++ riscv64
|
|
|
|
++ [ "aarch64-linux-qemu" "riscv64-linux-qemu" "x86_64-linux-native" "i686-linux-native" ]);
|
2024-07-23 14:13:39 +02:00
|
|
|
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
|
2024-08-21 21:37:19 +02:00
|
|
|
});
|
2024-10-23 12:50:16 +02:00
|
|
|
nixpkgs.config.allowUnsupportedSystem = true;
|
2024-11-03 14:31:55 +01:00
|
|
|
nix.distributedBuilds = true;
|
|
|
|
nix.gc.automatic = lib.mkForce false;
|
2024-05-11 16:02:39 +02:00
|
|
|
nix.settings = {
|
|
|
|
allowed-uris = [
|
|
|
|
"github:"
|
|
|
|
"git+https://"
|
|
|
|
"git+ssh://"
|
2024-05-12 19:54:39 +02:00
|
|
|
"https://"
|
2024-05-11 16:02:39 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
programs.ssh = {
|
2024-08-21 21:37:19 +02:00
|
|
|
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";
|
2024-10-23 12:50:16 +02:00
|
|
|
"schrodinger.kyouma.net".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKo7vZ6lS1wx76YsbAdhOsGcc20YMAW52ep8SZ/FCHDp";
|
2024-11-16 12:43:59 +01:00
|
|
|
"lab.nyantec.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIUePtVPtBK+CYosufbaGiMT4EVanti4V5t2Wg0g/Fy4";
|
2024-08-21 21:37:19 +02:00
|
|
|
"localhost".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPNVavo3YHVsrYwXRVISu7kDoknn+5inFGySn4azlB8P";
|
2024-11-21 00:51:39 +01:00
|
|
|
"[build-worker-kyoumanet.fly.dev]:2200".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUGzlilikAUfUGKXVCoTeDvPRoWUgDDkNU5WaRUBzls";
|
2024-08-21 21:37:19 +02:00
|
|
|
"[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";
|
2024-10-10 21:43:11 +02:00
|
|
|
"[build-worker-kyoumanet.fly.dev]:2205".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICNh1o1I98XrI2XmOI6Q0aHPfyLCIQwKkKOxGUUeXL9v";
|
|
|
|
"[build-worker-kyoumanet.fly.dev]:2206".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGf0kxGgwOG9KhUhvxxTSiQC5YikrzZXKDgSpBw33qN4";
|
|
|
|
"[build-worker-kyoumanet.fly.dev]:2207".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL9z95a6Fn/dB+iNigEYpuJdBnBwCkIZYaKHcFbGP+RY";
|
|
|
|
"[build-worker-kyoumanet.fly.dev]:2208".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAk+FNMhTfAVqk3MfLp4QiG/i5ti53DlpnC0q+sOvU9O";
|
2024-11-21 00:51:39 +01:00
|
|
|
"[build-worker-kyoumanet-cdg.fly.dev]:2209".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJGlQD/3fLn/Kyb7v0RIycHRcArGi75jURj803EMpW0S";
|
|
|
|
"[build-worker-kyoumanet-cdg.fly.dev]:2210".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMQm1FSGBGdCR5f8MvBvdKM0M4yIQVnH1po7hHO5T1qz";
|
|
|
|
"[build-worker-kyoumanet-cdg.fly.dev]:2211".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINlH+v2ZlcDQY3itw4b7aRbwRTqDsTE0R5Ua3vF0VaGr";
|
2024-08-21 21:37:19 +02:00
|
|
|
};
|
2024-11-03 14:31:55 +01:00
|
|
|
extraConfig = ''
|
|
|
|
Host machine-0008.cloud-v.co
|
|
|
|
Hostname machine.cloud-v.co
|
|
|
|
Port 20008
|
2024-11-21 00:51:39 +01:00
|
|
|
'' + lib.concatLines (lib.forEach (lib.range 0 11) (num: ''
|
|
|
|
Host build-worker-${lib.fixedWidthNumber 2 num}
|
|
|
|
Hostname build-worker-kyoumanet${lib.optionalString (num > 8) "-cdg"}.fly.dev
|
|
|
|
Port 22${lib.fixedWidthNumber 2 num}
|
|
|
|
''));
|
2024-05-11 16:02:39 +02:00
|
|
|
};
|
|
|
|
}
|