nixos/hosts/common/optional/distributed_builds/local-machine.nix

34 lines
782 B
Nix
Raw Normal View History

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;
nix.buildMachines = [
{
hostName = remoteMachineIp;
sshUser = "remotebuild";
speedFactor = 1;
maxJobs = 10;
2025-01-08 13:02:55 +00:00
sshKey = "/root/.ssh/remotebuild";
system = pkgs.stdenv.hostPlatform.system;
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";
};
};
}