From 3c4c6c7389b63c5ad84c85cec6e81b69c3b7a6d2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 20:16:57 +0000 Subject: [PATCH 1/3] Initial plan From d3a5b3e6efd0755bf0edb617bf4e5e4f2ae210d6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 20:18:36 +0000 Subject: [PATCH 2/3] fix(installer): write deployed flake.nix and remove flake.lock after install cleanup Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/b7dfaecc-2b2e-4f5f-bb9a-f97ced90e76e Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- iso/installer.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/iso/installer.py b/iso/installer.py index a1c86bf..0752db9 100644 --- a/iso/installer.py +++ b/iso/installer.py @@ -14,6 +14,28 @@ LOGO = "/etc/sovran/logo.png" LOG = "/tmp/sovran-install.log" FLAKE = "/etc/sovran/flake" +DEPLOYED_FLAKE = """\ +{ + description = "Sovran_SystemsOS for the Sovran Pro from Sovran Systems"; + + inputs = { + Sovran_Systems.url = "git+https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS"; + }; + + outputs = { self, Sovran_Systems, ... }@inputs: { + nixosConfigurations."nixos" = Sovran_Systems.inputs.nixpkgs.lib.nixosSystem { + modules = [ + { nixpkgs.hostPlatform = "x86_64-linux"; } + ./hardware-configuration.nix + ./role-state.nix + ./custom.nix + Sovran_Systems.nixosModules.Sovran_SystemsOS + ]; + }; + }; +} +""" + try: logfile = open(LOG, "a") atexit.register(logfile.close) @@ -933,6 +955,15 @@ class InstallerWindow(Adw.ApplicationWindow): path = os.path.join(nixos_dir, entry) run(["sudo", "rm", "-rf", path]) + GLib.idle_add(append_text, buf, "Writing deployed flake.nix...\n") + subprocess.run( + ["sudo", "tee", "/mnt/etc/nixos/flake.nix"], + input=DEPLOYED_FLAKE, + text=True, + check=True, + ) + run(["sudo", "rm", "-f", "/mnt/etc/nixos/flake.lock"]) + GLib.idle_add(self.push_create_password) # ── Step 5b: Create Password ────────────────────────────────────────── From 48de6b9821e077c097d1e7b8055ebdad91ef2670 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 20:20:36 +0000 Subject: [PATCH 3/3] fix(installer): improve error handling for deployed flake.nix write Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/b7dfaecc-2b2e-4f5f-bb9a-f97ced90e76e Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- iso/installer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/iso/installer.py b/iso/installer.py index 0752db9..3bd189c 100644 --- a/iso/installer.py +++ b/iso/installer.py @@ -956,12 +956,16 @@ class InstallerWindow(Adw.ApplicationWindow): run(["sudo", "rm", "-rf", path]) GLib.idle_add(append_text, buf, "Writing deployed flake.nix...\n") - subprocess.run( + proc = subprocess.run( ["sudo", "tee", "/mnt/etc/nixos/flake.nix"], input=DEPLOYED_FLAKE, + capture_output=True, text=True, - check=True, ) + log(proc.stdout) + if proc.returncode != 0: + log(proc.stderr) + raise RuntimeError(proc.stderr.strip() or "Failed to write deployed flake.nix") run(["sudo", "rm", "-f", "/mnt/etc/nixos/flake.lock"]) GLib.idle_add(self.push_create_password)