fix: remove sshPort from buildMachines (use SSH config instead)
This commit is contained in:
@@ -19,7 +19,7 @@ in {
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 2424;
|
||||
description = "SSH port on the remote build machine.";
|
||||
description = "SSH port — added via ~root/.ssh/config since nix.buildMachines has no sshPort option.";
|
||||
};
|
||||
systems = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
@@ -50,7 +50,6 @@ in {
|
||||
nix.buildMachines = [{
|
||||
hostName = cfg.buildMachine.host;
|
||||
sshUser = cfg.buildMachine.sshUser;
|
||||
sshPort = cfg.buildMachine.port;
|
||||
systems = cfg.buildMachine.systems;
|
||||
maxJobs = cfg.buildMachine.maxJobs;
|
||||
supportedFeatures = cfg.buildMachine.supportedFeatures;
|
||||
@@ -60,5 +59,13 @@ in {
|
||||
builders-use-substitutes = true
|
||||
fallback = true
|
||||
'';
|
||||
|
||||
# SSH config for the remote builder (since nix.buildMachines has no port option)
|
||||
programs.ssh.extraConfig = ''
|
||||
Host ${cfg.buildMachine.host}
|
||||
HostName ${cfg.buildMachine.host}
|
||||
Port ${toString cfg.buildMachine.port}
|
||||
User ${cfg.buildMachine.sshUser}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user