2025-01-08 13:02:55 +00:00
|
|
|
{ pkgs, configVars, ... }:
|
|
|
|
let
|
|
|
|
remoteMachineIp = configVars.networking.addresses.remote-builder.ip;
|
|
|
|
in
|
2025-01-08 11:59:40 +00:00
|
|
|
{
|
2025-01-08 13:02:55 +00:00
|
|
|
nix.distributedBuilds = true;
|
|
|
|
nix.settings.builders-use-substitutes = true;
|
2025-01-08 19:25:16 +00:00
|
|
|
nix.settings.max-jobs = 0;
|
|
|
|
nix.settings.trusted-substituters = ["ssh://${remoteMachineIp}"];
|
|
|
|
nix.settings.substituters = ["ssh://${remoteMachineIp}"];
|
2025-01-08 13:02:55 +00:00
|
|
|
|
|
|
|
nix.buildMachines = [
|
|
|
|
{
|
|
|
|
hostName = remoteMachineIp;
|
|
|
|
sshUser = "remotebuild";
|
2025-01-08 18:41:58 +00:00
|
|
|
speedFactor = 1;
|
|
|
|
maxJobs = 10;
|
2025-01-08 13:02:55 +00:00
|
|
|
sshKey = "/root/.ssh/remotebuild";
|
|
|
|
system = pkgs.stdenv.hostPlatform.system;
|
2025-01-08 18:41:58 +00:00
|
|
|
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
2025-01-08 13:02:55 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
# TODO: set known host here when have static ip on main server
|
|
|
|
# programs.ssh.knownHosts = {
|
|
|
|
# "merlin" = {
|
|
|
|
# publicKey = "server pubkey";
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
|
2025-01-08 12:15:11 +00:00
|
|
|
sops.secrets = {
|
2025-01-08 11:59:40 +00:00
|
|
|
"ssh_keys/root/remotebuild" = {
|
|
|
|
path = "/root/.ssh/remotebuild";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|