fix: remove sshPort from buildMachines (use SSH config instead)
This commit is contained in:
@@ -19,7 +19,7 @@ in {
|
|||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
type = lib.types.port;
|
type = lib.types.port;
|
||||||
default = 2424;
|
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 {
|
systems = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
@@ -50,7 +50,6 @@ in {
|
|||||||
nix.buildMachines = [{
|
nix.buildMachines = [{
|
||||||
hostName = cfg.buildMachine.host;
|
hostName = cfg.buildMachine.host;
|
||||||
sshUser = cfg.buildMachine.sshUser;
|
sshUser = cfg.buildMachine.sshUser;
|
||||||
sshPort = cfg.buildMachine.port;
|
|
||||||
systems = cfg.buildMachine.systems;
|
systems = cfg.buildMachine.systems;
|
||||||
maxJobs = cfg.buildMachine.maxJobs;
|
maxJobs = cfg.buildMachine.maxJobs;
|
||||||
supportedFeatures = cfg.buildMachine.supportedFeatures;
|
supportedFeatures = cfg.buildMachine.supportedFeatures;
|
||||||
@@ -60,5 +59,13 @@ in {
|
|||||||
builders-use-substitutes = true
|
builders-use-substitutes = true
|
||||||
fallback = 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