{ pkgs, vars, ... }: { # Install the remote builder key on each client host (do not commit private keys): # sudo install -d -m 0700 /root/.ssh # sudo install -m 0600 ./nixremote /root/.ssh/nixremote # sudo ssh -i /root/.ssh/nixremote nixremote@nix-cache nix-store --version nix = { distributedBuilds = true; buildMachines = [ { hostName = vars.nixCacheHost; sshUser = vars.remoteBuilderUser; sshKey = "/root/.ssh/${vars.remoteBuilderUser}"; inherit (pkgs.stdenv.hostPlatform) system; maxJobs = 4; speedFactor = 2; supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; } ]; settings = { builders-use-substitutes = true; max-jobs = "auto"; }; }; }