Skip to content

Commit 663d4b2

Browse files
authored
Merge pull request #327 from Prince213/extra-files
Misc fixes to --extra-files
2 parents d8b8cc6 + 09f1f83 commit 663d4b2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/nixos-anywhere.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ Options:
3333
copy over existing /etc/ssh/ssh_host_* host keys to the installation
3434
* --stop-after-disko
3535
exit after disko formatting, you can then proceed to install manually or some other way
36-
* --extra-files <file...>
37-
files to copy into the new nixos installation
36+
* --extra-files <path>
37+
path to a directory to copy into the root of the new nixos installation.
38+
Copied files will be owned by root.
3839
* --disk-encryption-keys <remote_path> <local_path>
3940
copy the contents of the file or pipe in local_path to remote_path in the installer environment,
4041
after kexec but before installation. Can be repeated.
@@ -475,11 +476,8 @@ elif [[ ${build_on_remote-n} == "y" ]]; then
475476
fi
476477

477478
if [[ -n ${extra_files-} ]]; then
478-
if [[ -d $extra_files ]]; then
479-
extra_files="$extra_files/"
480-
fi
481479
step Copying extra files
482-
tar -C "$extra_files" -cpf- . | ssh_ "${maybe_sudo} tar -C /mnt -xf-"
480+
tar -C "$extra_files" -cpf- . | ssh_ "${maybe_sudo} tar -C /mnt -xf- --no-same-owner"
483481
ssh_ "chmod 755 /mnt" # tar also changes permissions of /mnt
484482
fi
485483

0 commit comments

Comments
 (0)