Skip to content

Commit f872740

Browse files
committed
refactor: encode ssh store URL
1 parent 711c816 commit f872740

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/nixos-anywhere.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ runDisko() {
638638
# If we don't use ssh-ng here, we get `error: operation 'getFSAccessor' is not supported by store`
639639
diskoScript=$(
640640
nixBuild "${flake}#${flakeAttr}.system.build.${diskoMode}Script" \
641-
--eval-store auto --store "ssh-ng://$sshConnection?ssh-key=$sshKeyDir/nixos-anywhere"
641+
--eval-store auto --store "ssh-ng://$sshConnection?ssh-key=$sshKeyDir%2Fnixos-anywhere"
642642
)
643643
fi
644644
@@ -650,17 +650,17 @@ nixosInstall() {
650650
local nixosSystem=$1
651651
if [[ -n ${nixosSystem} ]]; then
652652
step Uploading the system closure
653-
nixCopy --to "ssh://$sshConnection?remote-store=local?root=/mnt" "$nixosSystem"
653+
nixCopy --to "ssh://$sshConnection?remote-store=local%3Froot=%2Fmnt" "$nixosSystem"
654654
elif [[ ${buildOn} == "remote" ]]; then
655655
step Building the system closure
656656
# We need to do a nix copy first because nix build doesn't have --no-check-sigs
657657
# Use ssh:// here to avoid https://github.com/NixOS/nix/issues/7359
658-
nixCopy --to "ssh://$sshConnection?remote-store=local?root=/mnt" "${flake}#${flakeAttr}.system.build.toplevel" \
658+
nixCopy --to "ssh://$sshConnection?remote-store=local%3Froot=%2Fmnt" "${flake}#${flakeAttr}.system.build.toplevel" \
659659
--derivation --no-check-sigs
660660
# If we don't use ssh-ng here, we get `error: operation 'getFSAccessor' is not supported by store`
661661
nixosSystem=$(
662662
nixBuild "${flake}#${flakeAttr}.system.build.toplevel" \
663-
--eval-store auto --store "ssh-ng://$sshConnection?ssh-key=$sshKeyDir/nixos-anywhere&remote-store=local?root=/mnt"
663+
--eval-store auto --store "ssh-ng://$sshConnection?ssh-key=$sshKeyDir%2Fnixos-anywhere&remote-store=local%3Froot=%2Fmnt"
664664
)
665665
fi
666666

0 commit comments

Comments
 (0)