BuildNixosIsoCommand

Builds the NixOS installer ISO via the NixOS WSL distro and copies the result to a Windows-side path. Wraps the same nix build that src/NETSetup/nixos/scripts/build-nixos-image.sh performs, minus the Dropbox publish step — the test path only needs the local ISO to upload to a remote Proxmox host via PveHost.UploadISO.

Note

Requires:

  • wsl.exe on PATH (Windows native).

  • A WSL distro (default NixOS) with nix + git available.

  • The flake dir reachable from WSL via /mnt/<drive>/....

public sealed class BuildNixosIsoCommand

1. Fields

1.1. BuildScriptRelativePath

Relative path of the build script under the flake dir.

public const string BuildScriptRelativePath

1.2. DefaultWslDistro

Default WSL distro name.

public const string DefaultWslDistro

2. Properties

2.1. NixDir

Windows-side path to the nix flake directory (e.g. src/NETSetup/nixos).

public AbsolutePath NixDir { get; }

2.2. OutputIsoPath

Windows-side absolute path the produced ISO is copied to.

public AbsolutePath OutputIsoPath { get; }

2.3. RenderedShellCommand

Rendered shell command that PowershellCommand executes (test seam).

public string RenderedShellCommand { get; }

2.4. WslDistro

WSL distro name (default DefaultWslDistro).

public string WslDistro { get; }

3. Methods

3.1. Execute(TimeSpan, ILogger)

Runs the WSL nix build via PowershellCommand.

public BuildNixosIsoResult Execute(TimeSpan timeout, ILogger logger)
Table 1. Parameters
Name Type Description

timeout

TimeSpan

logger

ILogger

Returns: BuildNixosIsoResult

3.2. ToWslPath(AbsolutePath)

Converts C:\foo\bar → /mnt/c/foo/bar for WSL.

public static string ToWslPath(AbsolutePath path)
Table 2. Parameters
Name Type Description

path

AbsolutePath

Returns: string