Skip to content

Commit 4b3c5fa

Browse files
authored
Merge pull request #559 from nix-community/speed
nixos-anywhere: speed up `--build-on remote`
2 parents ff87db6 + f14e1e4 commit 4b3c5fa

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/nixos-anywhere.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ flake=""
66
flakeAttr=""
77
kexecUrl=""
88
kexecExtraFlags=""
9-
sshStoreSettings=""
9+
sshStoreSettings="compress=true"
1010
enableDebug=""
1111
nixBuildFlags=()
1212
diskoAttr=""
@@ -711,11 +711,6 @@ runDisko() {
711711
nixCopy --to "ssh://$sshConnection?$sshStoreSettings" "$diskoScript"
712712
elif [[ ${buildOn} == "remote" ]]; then
713713
step Building disko script
714-
# We need to do a nix copy first because nix build doesn't have --no-check-sigs
715-
# Use ssh:// here to avoid https://github.com/NixOS/nix/issues/7359
716-
nixCopy --to "ssh://$sshConnection?$sshStoreSettings" "${flake}#${flakeAttr}.system.build.${diskoMode}Script" \
717-
--derivation --no-check-sigs
718-
# If we don't use ssh-ng here, we get `error: operation 'getFSAccessor' is not supported by store`
719714
diskoScript=$(
720715
nixBuild "${flake}#${flakeAttr}.system.build.${diskoAttr}" \
721716
--eval-store auto --store "ssh-ng://$sshConnection?ssh-key=$tempDir%2Fnixos-anywhere&$sshStoreSettings"
@@ -733,11 +728,6 @@ nixosInstall() {
733728
nixCopy --to "ssh://$sshConnection?remote-store=local%3Froot=%2Fmnt&$sshStoreSettings" "$nixosSystem"
734729
elif [[ ${buildOn} == "remote" ]]; then
735730
step Building the system closure
736-
# We need to do a nix copy first because nix build doesn't have --no-check-sigs
737-
# Use ssh:// here to avoid https://github.com/NixOS/nix/issues/7359
738-
nixCopy --to "ssh://$sshConnection?remote-store=local%3Froot=%2Fmnt&$sshStoreSettings" "${flake}#${flakeAttr}.system.build.toplevel" \
739-
--derivation --no-check-sigs
740-
# If we don't use ssh-ng here, we get `error: operation 'getFSAccessor' is not supported by store`
741731
nixosSystem=$(
742732
nixBuild "${flake}#${flakeAttr}.system.build.toplevel" \
743733
--eval-store auto --store "ssh-ng://$sshConnection?ssh-key=$tempDir%2Fnixos-anywhere&remote-store=local%3Froot=%2Fmnt&$sshStoreSettings"

0 commit comments

Comments
 (0)