2024-05-04 23:15:57 +03:00
|
|
|
# Module that enables remote builds. This is a client configuration.
|
2024-06-24 17:53:37 +03:00
|
|
|
{ lib, secret, ... }: {
|
2024-05-04 23:15:57 +03:00
|
|
|
# NOTE: Requires host private key to be present in secret.ssh.builderKeys.
|
2024-03-09 18:38:41 +03:00
|
|
|
nix.buildMachines = [{
|
2024-04-27 00:24:28 +03:00
|
|
|
hostName = "nixbuilder";
|
2024-03-09 18:38:41 +03:00
|
|
|
protocol = "ssh-ng";
|
2024-03-09 20:29:19 +03:00
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"i686-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
];
|
2024-03-09 18:38:41 +03:00
|
|
|
maxJobs = 1;
|
|
|
|
speedFactor = 2;
|
|
|
|
mandatoryFeatures = [ ];
|
2024-03-09 20:21:34 +03:00
|
|
|
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
2024-03-09 18:38:41 +03:00
|
|
|
}];
|
|
|
|
nix.distributedBuilds = true;
|
2024-06-24 17:53:37 +03:00
|
|
|
nix.settings = let
|
|
|
|
substituters = [ "ssh-ng://nixbuilder" ];
|
|
|
|
in {
|
2024-06-24 19:12:08 +03:00
|
|
|
substituters = lib.mkForce substituters;
|
|
|
|
trusted-substituters = substituters;
|
2024-06-24 17:53:37 +03:00
|
|
|
builders-use-substitutes = true;
|
|
|
|
max-jobs = 0;
|
|
|
|
trusted-public-keys = [ secret.ssh.builderKey ];
|
2024-06-24 19:20:40 +03:00
|
|
|
# require-sigs = false;
|
2024-06-24 17:53:37 +03:00
|
|
|
# substitute = false;
|
|
|
|
};
|
2024-03-09 18:38:41 +03:00
|
|
|
}
|