From 7aba5fa0a8f962526b817146fc83f17219eb3894 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Wed, 10 Jun 2026 17:09:08 +0100 Subject: [PATCH] fix(install): pin a representative disko script into the ISO closure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit disko builds its format/mount script at install time; offline, the script's tool closure (file, which, wrapper hooks) wasn't on the ISO and nix tried to build it from source — which needs the network. Pre-building one representative script (luks + swap variant) pins every input; the user's actual invocation then differs only in the final text-generation derivation, which builds offline in seconds. Co-Authored-By: Claude Fable 5 --- flake.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/flake.nix b/flake.nix index c8350d1..4fa7ed8 100644 --- a/flake.nix +++ b/flake.nix @@ -219,6 +219,20 @@ }; in [ template.nixosConfigurations.default.config.system.build.toplevel template.homeConfigurations.${username}.activationPackage + + # …and one representative disko script: its tool closure + # (file, which, wrapper hooks, …) isn't otherwise on the + # ISO, and offline nix would try to build it from source. + # The user's actual args produce a different script drv, + # but with identical inputs — built offline in seconds. + (import "${pkgs.disko}/share/disko/cli.nix" { + inherit pkgs; + mode = "destroy,format,mount"; + diskoFile = ./pkgs/nomarchy-install/disko-config.nix; + mainDrive = "/dev/vda"; + withLuks = true; + swapSize = "2G"; + }) ] ); }