From 35569e6ec085566b8533a6fea127521c231c04ab Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 16:53:30 +0000 Subject: [PATCH 1/2] Initial plan From 37ad4fd2adbe8ee4148121c4b5c929afbab132bd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 16:54:29 +0000 Subject: [PATCH 2/2] fix: copy role-state.nix and custom.nix to host /etc/nixos before nixos-install Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/38396f35-c812-43e5-9bf0-f7bd611cbba7 Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- iso/installer.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/iso/installer.py b/iso/installer.py index e1fc844..3ba12c1 100644 --- a/iso/installer.py +++ b/iso/installer.py @@ -876,6 +876,14 @@ class InstallerWindow(Adw.ApplicationWindow): if not os.path.exists(f): raise RuntimeError(f"Required file missing: {f}") + # The flake.nix imports /etc/nixos/role-state.nix and /etc/nixos/custom.nix + # as absolute paths. With --impure, Nix resolves these on the live ISO host, + # not under /mnt. Copy them so they exist on the host filesystem too. + GLib.idle_add(append_text, buf, "Copying config files to host /etc/nixos for flake evaluation...\n") + run(["sudo", "mkdir", "-p", "/etc/nixos"]) + run(["sudo", "cp", "/mnt/etc/nixos/role-state.nix", "/etc/nixos/role-state.nix"]) + run(["sudo", "cp", "/mnt/etc/nixos/custom.nix", "/etc/nixos/custom.nix"]) + run_stream([ "sudo", "nixos-install", "--root", "/mnt",