diff --git a/pkgs/nomarchy-install/nomarchy-install.sh b/pkgs/nomarchy-install/nomarchy-install.sh index 4b7f8c8..0d7b27d 100644 --- a/pkgs/nomarchy-install/nomarchy-install.sh +++ b/pkgs/nomarchy-install/nomarchy-install.sh @@ -425,15 +425,17 @@ section "Installing (this takes a while)" # `flake archive --to` enforces signatures and locally-evaluated source # paths have none; plain `nix copy` accepts --no-check-sigs. info "Seeding flake inputs into the target store..." +# path: (not git+file) — the flake dir is owned by the target user and +# root's libgit2 refuses repositories owned by someone else. flake_paths=$(nix --extra-experimental-features "nix-command flakes" \ - flake archive --json "$FLAKE_DIR" 2>/dev/null \ + flake archive --json "path:$FLAKE_DIR" \ | python3 -c ' import json, sys def walk(node): yield node["path"] for child in node.get("inputs", {}).values(): yield from walk(child) -print("\n".join(walk(json.load(sys.stdin))))') +print("\n".join(walk(json.load(sys.stdin))))' || true) if [[ -n "$flake_paths" ]]; then # shellcheck disable=SC2086 nix --extra-experimental-features "nix-command flakes" \ @@ -455,7 +457,7 @@ if [[ ${#NIXOS_INSTALL_OPTS[@]} -gt 0 ]]; then copy --all --no-check-sigs --to "local?root=/mnt" fi -nixos-install --no-root-passwd "${NIXOS_INSTALL_OPTS[@]}" --flake "$FLAKE_DIR#default" +nixos-install --no-root-passwd "${NIXOS_INSTALL_OPTS[@]}" --flake "path:$FLAKE_DIR#default" success "System installed (bootloader in place)" # Pre-activate the Home Manager generation so the FIRST boot lands in the