Fix disko command: use single format,mount call since disks are pre-wiped

Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/80b0e65c-24c9-4448-9fdb-870891ecc30e

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-05 15:18:54 +00:00
committed by GitHub
parent d65193d7d3
commit cf09845431

View File

@@ -728,27 +728,18 @@ class InstallerWindow(Adw.ApplicationWindow):
# Short settle so the kernel finishes re-reading # Short settle so the kernel finishes re-reading
time.sleep(2) time.sleep(2)
# ── Now run disko on a clean disk ── # ── Now run disko to partition, format, and mount ──
GLib.idle_add(append_text, buf, "\n=== Partitioning drives ===\n") # Disks are already wiped clean by sgdisk/wipefs above,
cmd_destroy = [ # so we only need disko to create partitions, format, and mount.
"sudo", "disko", "--mode", "destroy", GLib.idle_add(append_text, buf, "\n=== Partitioning and formatting drives ===\n")
"--yes-wipe-all-disks", cmd = [
f"{FLAKE}/iso/disko.nix",
"--arg", "device", boot_path
]
if data_path:
cmd_destroy += ["--arg", "dataDevice", data_path]
run_stream(cmd_destroy, buf)
GLib.idle_add(append_text, buf, "\n=== Formatting and mounting drives ===\n")
cmd_format = [
"sudo", "disko", "--mode", "format,mount", "sudo", "disko", "--mode", "format,mount",
f"{FLAKE}/iso/disko.nix", f"{FLAKE}/iso/disko.nix",
"--arg", "device", boot_path "--arg", "device", boot_path
] ]
if data_path: if data_path:
cmd_format += ["--arg", "dataDevice", data_path] cmd += ["--arg", "dataDevice", data_path]
run_stream(cmd_format, buf) run_stream(cmd, buf)
GLib.idle_add(append_text, buf, "\n=== Generating hardware config ===\n") GLib.idle_add(append_text, buf, "\n=== Generating hardware config ===\n")
run_stream(["sudo", "nixos-generate-config", "--root", "/mnt"], buf) run_stream(["sudo", "nixos-generate-config", "--root", "/mnt"], buf)