diff --git a/pkgs/nomarchy-install/nomarchy-install.sh b/pkgs/nomarchy-install/nomarchy-install.sh index ecab1ec..96ecb72 100644 --- a/pkgs/nomarchy-install/nomarchy-install.sh +++ b/pkgs/nomarchy-install/nomarchy-install.sh @@ -70,10 +70,14 @@ 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. +# is pinned into the ISO — drop the binary caches and substitute from the +# live store's daemon instead. The explicit daemon substituter matters: +# nixos-install builds with --store /mnt and its own "auto?trusted=1" +# substituter resolves to the TARGET store (i.e. itself), so without +# this nothing flows from the ISO and nix bootstraps gcc from source. if ! timeout 3 bash -c '/dev/null; then - info "No network — disabling binary caches (the ISO carries everything)." - NIX_CONFIG+=$'\nsubstituters =\nbuilders =' + info "No network — substituting from the ISO store only." + NIX_CONFIG+=$'\nsubstituters =\nextra-substituters = daemon?trusted=1\nbuilders =' fi # ─── Disk selection ───────────────────────────────────────────────────── @@ -439,7 +443,8 @@ set -e export PATH=/run/current-system/sw/bin:\$PATH export NIX_CONFIG=$(printf '%q' "$NIX_CONFIG") out=\$(nix --extra-experimental-features "nix-command flakes" \ - build --offline --no-link --print-out-paths \ + build --no-link --print-out-paths \ + --option substituters "" \ "/home/$USERNAME/.nomarchy#homeConfigurations.$USERNAME.activationPackage") install -d -o "$USERNAME" -g users /nix/var/nix/profiles/per-user/$USERNAME install -d -o "$USERNAME" -g users /nix/var/nix/gcroots/per-user/$USERNAME