Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ in
'';
};

speedFactor = mkOption {
type = types.int;
default = 1;
description = ''
The relative speed factor of the builder.
This sets the speed factor in the `nix.buildMachines` specification,
which affects how Nix distributes build tasks to this machine.
'';
};

cores = mkOption {
type = types.int;
default = 8;
Expand Down Expand Up @@ -119,6 +129,18 @@ in
The SSH port used by the VM.
'';
};

sshProtocol = mkOption {
type = types.enum [
"ssh"
"ssh-ng"
];
default = "ssh-ng";
description = ''
The SSH protocol to use for remote builds.
Options are "ssh" (legacy) or "ssh-ng" (newer protocol with better performance).
'';
};
};

config =
Expand Down Expand Up @@ -376,9 +398,10 @@ in
nix = {
buildMachines = [
{
inherit (cfg) speedFactor;
hostName = sshHost;
maxJobs = cfg.cores;
protocol = "ssh-ng";
protocol = cfg.sshProtocol;
supportedFeatures = [
"benchmark"
"big-parallel"
Expand Down