diff --git a/flake.nix b/flake.nix index 8c3a247..3571e58 100644 --- a/flake.nix +++ b/flake.nix @@ -250,6 +250,17 @@ representativeInstall.config.system.build.toplevel template.homeConfigurations.${username}.activationPackage + # A real install rebuilds the few drvs that embed the + # user's hostname/username/UUIDs (etc, initrd, toplevel, + # HM activation). Their BUILDERS need tools that are in + # no runtime closure (etc uses python3-minimal, the + # initrd its packing tools) — inputDerivation pins each + # drv's full build inputs. + representativeInstall.config.system.build.toplevel.inputDerivation + representativeInstall.config.system.build.etc.inputDerivation + representativeInstall.config.system.build.initialRamdisk.inputDerivation + template.homeConfigurations.${username}.activationPackage.inputDerivation + # …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. diff --git a/pkgs/nomarchy-install/nomarchy-install.sh b/pkgs/nomarchy-install/nomarchy-install.sh index 58da6f2..15a2627 100644 --- a/pkgs/nomarchy-install/nomarchy-install.sh +++ b/pkgs/nomarchy-install/nomarchy-install.sh @@ -68,6 +68,14 @@ grep -q nomarchy-live /etc/hostname 2>/dev/null \ export NIX_PATH="nixpkgs=$NOMARCHY_NIXPKGS" export NIX_CONFIG="flake-registry = $SHARE/registry.json" +# With no network, every substituter query is a DNS timeout + retry storm +# (and tickles a nix goal.cc assertion crash). Everything an install needs +# is pinned into the ISO — drop substituters entirely when offline. +if ! timeout 3 bash -c '/dev/null; then + info "No network — disabling binary caches (the ISO carries everything)." + NIX_CONFIG+=$'\nsubstituters =\nbuilders =' +fi + # ─── Disk selection ───────────────────────────────────────────────────── section "Target disk" @@ -413,6 +421,7 @@ section "Baking the desktop" cat > /mnt/tmp/nomarchy-hm-activate.sh <