From 5770dd84d2e3f7a6635450b353fc2fb955262ca8 Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Mon, 27 May 2024 10:42:04 +0800 Subject: [PATCH] fix(src/nixos-anywhere): extra-files expects a path --- src/nixos-anywhere.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/nixos-anywhere.sh b/src/nixos-anywhere.sh index 68c5112..09cc34f 100755 --- a/src/nixos-anywhere.sh +++ b/src/nixos-anywhere.sh @@ -33,8 +33,9 @@ Options: copy over existing /etc/ssh/ssh_host_* host keys to the installation * --stop-after-disko exit after disko formatting, you can then proceed to install manually or some other way -* --extra-files - files to copy into the new nixos installation +* --extra-files + path to a directory to copy into the root of the new nixos installation. + Copied files will be owned by root. * --disk-encryption-keys copy the contents of the file or pipe in local_path to remote_path in the installer environment, after kexec but before installation. Can be repeated. @@ -475,9 +476,6 @@ elif [[ ${build_on_remote-n} == "y" ]]; then fi if [[ -n ${extra_files-} ]]; then - if [[ -d $extra_files ]]; then - extra_files="$extra_files/" - fi step Copying extra files tar -C "$extra_files" -cpf- . | ssh_ "${maybe_sudo} tar -C /mnt -xf-" ssh_ "chmod 755 /mnt" # tar also changes permissions of /mnt