NixRemoteInstallCommand

Composite NETCommand: ssh-keyscan → scp config dir → ssh "install.sh". Each phase is a LinuxCommandBase internally. Built via NixRemoteInstallCommand.Builder.

public sealed class NixRemoteInstallCommand

1. Properties

1.1. ConfigDir

Local directory containing generated nix config to scp.

public AbsolutePath ConfigDir { get; }

1.2. CopyHostKeys

Propagate host /etc/ssh/ssh_host_* keys to target.

public bool CopyHostKeys { get; }

1.3. DiskDevice

Target disk device.

public string DiskDevice { get; }

1.4. Hostname

Target hostname.

public string Hostname { get; }

1.5. Ip

Target VM ip.

public IPAddress Ip { get; }

1.6. MasterKey

Master private key for root ssh login.

public AbsolutePath MasterKey { get; }

1.7. RenderedScpArgs

Rendered scp args (test seam, legacy — kept for unit tests).

public string RenderedScpArgs { get; }

1.8. RenderedSshArgs

Rendered ssh install args (test seam).

public string RenderedSshArgs { get; }

1.9. RenderedTarPipeShellCommand

Rendered tar-pipe-over-ssh shell command (test seam). Used instead of scp because older Proxmox scp defaults to legacy SCP protocol which is broken by the nixos installer’s login banner ("Received message too long"). tar streams its data through ssh’s stdin so any motd/banner on stderr is harmless.

public string RenderedTarPipeShellCommand { get; }

2. Methods

2.1. Execute(TimeSpan, ILogger)

Executes all three phases. Cross-platform: native bash on Linux, WSL nix-shell wrap on Windows.

public NixRemoteInstallResult Execute(TimeSpan installTimeout, ILogger logger)
Table 1. Parameters
Name Type Description

installTimeout

TimeSpan

logger

ILogger

Returns: NixRemoteInstallResult

2.2. ToShellPath(AbsolutePath)

Native path on Linux; /mnt/c/... WSL form on Windows.

public static string ToShellPath(AbsolutePath p)
Table 2. Parameters
Name Type Description

p

AbsolutePath

Returns: string

2.3. TryPickDisks(string, string, string)

Picks largest non-removable disk as install target, smallest as install-time swap.

public static bool TryPickDisks(string lsblkJson, out string installDisk, out string swapDisk)
Table 3. Parameters
Name Type Description

lsblkJson

string

installDisk

string

swapDisk

string

Returns: bool