Skip to content

Commit

Permalink
refactor: encode ssh store URL
Browse files Browse the repository at this point in the history
  • Loading branch information
aabccd021 committed Aug 13, 2024
1 parent 1933f2e commit b3d6481
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ elif [[ ${build_on_remote-n} == "y" ]]; then
--derivation --no-check-sigs
disko_script=$(
nix_build "${flake}#nixosConfigurations.\"${flakeAttr}\".config.system.build.diskoScript" \
--eval-store auto --store "ssh-ng://$ssh_connection?ssh-key=$ssh_key_dir/nixos-anywhere"
--eval-store auto --store "ssh-ng://$ssh_connection?ssh-key=$ssh_key_dir%2Fnixos-anywhere"
)
fi

Expand All @@ -470,15 +470,15 @@ fi

if [[ -n ${nixos_system-} ]]; then
step Uploading the system closure
nix_copy --to "ssh://$ssh_connection?remote-store=local?root=/mnt" "$nixos_system"
nix_copy --to "ssh://$ssh_connection?remote-store=local%3Froot=%2Fmnt" "$nixos_system"
elif [[ ${build_on_remote-n} == "y" ]]; then
step Building the system closure
# We need to do a nix copy first because nix build doesn't have --no-check-sigs
nix_copy --to "ssh-ng://$ssh_connection?remote-store=local?root=/mnt" "${flake}#nixosConfigurations.\"${flakeAttr}\".config.system.build.toplevel" \
nix_copy --to "ssh-ng://$ssh_connection?remote-store=local%3Froot=%2Fmnt" "${flake}#nixosConfigurations.\"${flakeAttr}\".config.system.build.toplevel" \
--derivation --no-check-sigs
nixos_system=$(
nix_build "${flake}#nixosConfigurations.\"${flakeAttr}\".config.system.build.toplevel" \
--eval-store auto --store "ssh-ng://$ssh_connection?ssh-key=$ssh_key_dir/nixos-anywhere&remote-store=local?root=/mnt"
--eval-store auto --store "ssh-ng://$ssh_connection?ssh-key=$ssh_key_dir%2Fnixos-anywhere&remote-store=local%3Froot=%2Fmnt"
)
fi

Expand Down

0 comments on commit b3d6481

Please sign in to comment.