Fix disko mount failure by splitting destroy and format,mount into separate calls

Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/0f9fe8d2-554e-4048-9dba-5a3c3c663410

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-05 14:41:16 +00:00
committed by GitHub
parent fee6035de0
commit ca275c45de

View File

@@ -730,15 +730,25 @@ class InstallerWindow(Adw.ApplicationWindow):
# ── Now run disko on a clean disk ──
GLib.idle_add(append_text, buf, "\n=== Partitioning drives ===\n")
cmd = [
"sudo", "disko", "--mode", "destroy,format,mount",
cmd_destroy = [
"sudo", "disko", "--mode", "destroy",
"--yes-wipe-all-disks",
f"{FLAKE}/iso/disko.nix",
"--arg", "device", boot_path
]
if data_path:
cmd += ["--arg", "dataDevice", data_path]
run_stream(cmd, buf)
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",
f"{FLAKE}/iso/disko.nix",
"--arg", "device", boot_path
]
if data_path:
cmd_format += ["--arg", "dataDevice", data_path]
run_stream(cmd_format, buf)
GLib.idle_add(append_text, buf, "\n=== Generating hardware config ===\n")
run_stream(["sudo", "nixos-generate-config", "--root", "/mnt"], buf)