nixos/hosts/common/optional/distributed_builds/remote-builder-machine.nix

25 lines
557 B
Nix
Raw Normal View History

2025-01-08 13:02:55 +00:00
{ pkgs, configVars, ... }:
let
remoteBuilderIp = 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 11:59:40 +00:00
2025-01-08 13:02:55 +00:00
nix.buildMachines = [
{
hostName = remoteBuilderIp;
sshUser = "remotebuild";
sshKey = "/root/.ssh/remotebuild";
system = pkgs.stdenv.hostPlatform.system;
supportedFeatures = [ "nixos-test" "big-parallel" "kvm" ];
}
];
2025-01-08 11:59:40 +00:00
2025-01-08 13:02:55 +00:00
sops.secrets = {
"ssh_keys/root/remotebuild" = {
path = "/root/.ssh/remotebuild";
};
};
2025-01-08 11:59:40 +00:00
}