NixRemoteUpdateCommand
Composite NETCommand for the per-cycle Nix VM update path. Pushes the current source-of-truth nix config tree onto an installed VM and runs nixos-rebuild boot + reboot. Drift-correct: every cycle re-pushes both the base tree and the per-VM overlay so manual edits get reverted.
|
Note
|
Phase sequence:
|
public sealed class NixRemoteUpdateCommand
1. Fields
1.1. RemoteFlakeDir
Target on-VM flake directory.
public const string RemoteFlakeDir
2. Properties
2.1. BaseTreeDir
Local directory containing the source-of-truth base nixos tree (EnsureNixosConfigTreeOnProxmoxHost.ProxmoxConfigTreePath).
public AbsolutePath BaseTreeDir { get; }
2.2. Hostname
Target hostname (== NixOS networking.hostName).
public string Hostname { get; }
2.3. Ip
Target VM ip (installed system, not installer ISO).
public IPAddress Ip { get; }
2.4. MasterKey
Private key for root ssh login.
public AbsolutePath MasterKey { get; }
2.5. OverlayDir
Local directory containing the per-VM overlay (config.nix + hardware.nix + secrets.yaml + .default.key) from ProvisionNixosVm.EmitConfigBundle.
public AbsolutePath OverlayDir { get; }
3. Methods
3.1. Execute(TimeSpan, ILogger)
Runs all phases sequentially. Stops on the first failure.
public NixRemoteUpdateResult Execute(TimeSpan rebuildTimeout, ILogger logger)
| Name | Type | Description |
|---|---|---|
rebuildTimeout |
TimeSpan |
|
logger |
ILogger |
Returns: NixRemoteUpdateResult
3.2. ToShellPath(AbsolutePath)
Native path on Linux; /mnt/c/... WSL form on Windows.
public static string ToShellPath(AbsolutePath p)
| Name | Type | Description |
|---|---|---|
p |
AbsolutePath |
Returns: string