2023-09-14 19:44:27 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
2023-09-21 05:06:27 +01:00
|
|
|
inherit (lib.modules) mkIf mkMerge;
|
2023-09-14 19:44:27 +01:00
|
|
|
|
2023-09-18 03:56:58 +01:00
|
|
|
currentHostname = config.networking.hostName;
|
2023-09-14 19:44:27 +01:00
|
|
|
|
2023-09-18 03:56:58 +01:00
|
|
|
usbSSHKeyFile = "/usb/ssh-keys/chaos.priv";
|
2023-10-14 12:35:20 +01:00
|
|
|
normalSSHKeyFile = "/home/chaos/.ssh/id_ed25519";
|
2023-09-14 19:44:27 +01:00
|
|
|
|
2023-09-18 03:56:58 +01:00
|
|
|
sshKeyFile =
|
2023-09-14 19:44:27 +01:00
|
|
|
if
|
2023-09-18 03:56:58 +01:00
|
|
|
builtins.elem currentHostname [
|
2023-09-14 19:44:27 +01:00
|
|
|
"lappy-t495"
|
|
|
|
]
|
2023-09-18 03:56:58 +01:00
|
|
|
then usbSSHKeyFile
|
2024-09-03 19:22:10 +01:00
|
|
|
else if
|
|
|
|
builtins.elem currentHostname [
|
|
|
|
]
|
2023-10-16 18:17:28 +01:00
|
|
|
then normalSSHKeyFile
|
|
|
|
else throw "host isn't configured for remote-builders";
|
2023-09-14 19:44:27 +01:00
|
|
|
|
|
|
|
builderDefaults = {
|
|
|
|
sshUser = "root";
|
2023-09-18 03:56:58 +01:00
|
|
|
sshKey = sshKeyFile;
|
2023-09-14 19:44:27 +01:00
|
|
|
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
|
|
|
mandatoryFeatures = [];
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
nix.buildMachines = [
|
2023-09-21 05:06:27 +01:00
|
|
|
(mkIf (currentHostname != "hetzner-arm") (mkMerge [
|
|
|
|
builderDefaults
|
|
|
|
{
|
|
|
|
hostName = "hetzner-arm.servers.genderfucked.monster";
|
|
|
|
systems = ["aarch64-linux"];
|
2024-09-04 10:05:55 +01:00
|
|
|
supportedFeatures = ["native-arm64" "big-parallel"];
|
2023-09-21 05:06:27 +01:00
|
|
|
publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUk5cGM0REU1UlV4UUp2T1pwenFOQWVac0JlRW1kcmp4OFlnV3orVXBMckcgcm9vdEBoZXR6bmVyLWFybQo=";
|
2024-09-03 19:22:10 +01:00
|
|
|
maxJobs = 3;
|
|
|
|
speedFactor = 1;
|
|
|
|
}
|
|
|
|
]))
|
|
|
|
(mkIf (currentHostname != "raspberry-pi5") (mkMerge [
|
|
|
|
builderDefaults
|
|
|
|
{
|
|
|
|
hostName = "raspberry-pi5.servers.genderfucked.monster";
|
|
|
|
systems = ["aarch64-linux"];
|
2024-09-04 10:05:55 +01:00
|
|
|
supportedFeatures = ["native-arm64" "big-parallel"];
|
2024-09-03 19:22:10 +01:00
|
|
|
publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUNZNFpuQ1NVeWpjOHR3UXVpMzhwU21qdHluSVZUVnFiNzB5blNRa0Z3anYgcm9vdEByYXNwYmVycnkK";
|
|
|
|
maxJobs = 4;
|
|
|
|
speedFactor = 4;
|
2023-09-21 05:06:27 +01:00
|
|
|
}
|
|
|
|
]))
|
2023-09-14 19:44:27 +01:00
|
|
|
];
|
|
|
|
nix.distributedBuilds = true;
|
|
|
|
nix.extraOptions = "builders-use-substitutes = true";
|
|
|
|
}
|