Updated cp bad path.
This commit is contained in:
@@ -145,9 +145,9 @@ setup_ssh() {
|
||||
|
||||
echo -e "\n\n➡️ Copying SSH key to target host '${TARGET_USER}@${TARGET_HOST}'..."
|
||||
if sshpass -p "${REMOTE_PASS}" ssh-copy-id -o StrictHostKeyChecking=no -i "final-nix-config/home/numbus-admin/.ssh/id_ed25519" "${TARGET_USER}@${TARGET_HOST}"; then
|
||||
echo "✅ SSH key copied successfully."
|
||||
echo -e "\n✅ SSH key copied successfully."
|
||||
else
|
||||
echo "❌ Failed to copy SSH key. Please check the host IP and password."
|
||||
echo -e "\n❌ Failed to copy SSH key. Please check the host IP and password."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@@ -189,9 +189,9 @@ SSHEND
|
||||
|
||||
### --> Generate hardware-configuration.nix
|
||||
if ssh_to_host "sudo nixos-generate-config --no-filesystems --show-hardware-config" > final-nix-config/etc/nixos/hardware-configuration.nix; then
|
||||
echo -e "✅ Hardware configuration generated"
|
||||
echo -e "\n✅ Hardware configuration generated"
|
||||
else
|
||||
echo -e "❌ Failed to generate hardware configuration"
|
||||
echo -e "\n❌ Failed to generate hardware configuration"
|
||||
exit 1
|
||||
fi
|
||||
### Generate hardware-configuration.nix <--
|
||||
@@ -237,8 +237,8 @@ files_generation() {
|
||||
}
|
||||
|
||||
echo -e "\n✅ Copying the configuration to the new machine..."
|
||||
cp -avu templates/nix-config/configuration.nix final-nix-config/etc/nixos/
|
||||
cp -avu templates/nix-config/flake.nix final-nix-config/etc/nixos/
|
||||
cp -avu templates/nix-config/* final-nix-config/etc/nixos/
|
||||
cp -avu templates/nix-config/misc/* final-nix-config/etc/nixos/misc/
|
||||
|
||||
echo -e "\n✅ Generating sops-nix keys..."
|
||||
ssh-to-age -private-key -i final-nix-config/home/numbus-admin/.ssh/id_ed25519 > final-nix-config/var/lib/sops-nix/key.txt
|
||||
|
||||
Reference in New Issue
Block a user