Skip to content

Commit 75c8570

Browse files
bors[bot]phaer
andauthored
Merge #36
36: run nix copy --substitute-on-destination by default r=Mic92 a=phaer Co-authored-by: phaer <hello@phaer.org>
2 parents 9885361 + 89f64e4 commit 75c8570

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/nixos-remote.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Options:
2424
* --disk-encryption-keys remote_path local_path
2525
copy the contents of the file or pipe in local_path to remote_path in the installer environment,
2626
after kexec but before installation. Can be repeated.
27+
* --no-substitute-on-destination
28+
disable passing --substitute-on-destination to nix-copy
2729
* --debug
2830
enable debug output
2931
USAGE
@@ -37,6 +39,7 @@ abort() {
3739
kexec_url=https://github.com/nix-community/nixos-images/releases/download/nixos-22.11/nixos-kexec-installer-x86_64-linux.tar.gz
3840
enable_debug=""
3941
maybereboot="sleep 6 && reboot"
42+
substitute_on_destination="--substitute-on-destination"
4043

4144
declare -A disk_encryption_keys
4245

@@ -86,6 +89,10 @@ while [[ $# -gt 0 ]]; do
8689
--no-reboot)
8790
maybereboot=""
8891
;;
92+
--no-substitute-on-destination)
93+
substitute_on_destination=""
94+
;;
95+
8996
*)
9097
if [[ -z ${ssh_connection:-} ]]; then
9198
ssh_connection="$1"
@@ -117,7 +124,7 @@ fi
117124

118125
nix_copy() {
119126
NIX_SSHOPTS='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' nix copy \
120-
"${nix_options[@]}" \
127+
"${nix_options[@]}" "${substitute_on_destination}" \
121128
"$@"
122129
}
123130
nix_build() {

0 commit comments

Comments
 (0)