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

25 lines
557 B
Nix

{ pkgs, configVars, ... }:
let
remoteBuilderIp = configVars.networking.addresses.remote-builder.ip;
in
{
nix.distributedBuilds = true;
nix.settings.builders-use-substitutes = true;
nix.buildMachines = [
{
hostName = remoteBuilderIp;
sshUser = "remotebuild";
sshKey = "/root/.ssh/remotebuild";
system = pkgs.stdenv.hostPlatform.system;
supportedFeatures = [ "nixos-test" "big-parallel" "kvm" ];
}
];
sops.secrets = {
"ssh_keys/root/remotebuild" = {
path = "/root/.ssh/remotebuild";
};
};
}