fix: add host keys when deploying to a new machine so it will decrypt secrets
This commit is contained in:
parent
8a272b6410
commit
6de54986de
1 changed files with 3 additions and 5 deletions
|
@ -24,11 +24,9 @@ done
|
||||||
|
|
||||||
# Prepare temporary directory and copy necessary files
|
# Prepare temporary directory and copy necessary files
|
||||||
root=$(mktemp -d)
|
root=$(mktemp -d)
|
||||||
sudo mkdir -p ${root}/home/rafiq/.config/sops/age
|
sudo cp --verbose --archive --parents /etc/ssh/ssh_host_* ${root}
|
||||||
sudo cp ~/.config/sops/age/keys.txt "${root}/home/rafiq/.config/sops/age/keys.txt"
|
sudo cp --verbose --archive --parents ~/.ssh/id_ed25519 ${root}
|
||||||
sudo mkdir -p ${root}/home/rafiq/.ssh
|
sudo cp --verbose --archive --parents ~/.config/sops/age/keys.txt ${root}
|
||||||
sudo cp ~/.ssh/id_ed25519 "${root}/home/rafiq/.ssh/id_ed25519"
|
|
||||||
sudo cp ~/.ssh/id_ed25519.pub "${root}/home/rafiq/.ssh/id_ed25519.pub"
|
|
||||||
|
|
||||||
# Run nixos-anywhere
|
# Run nixos-anywhere
|
||||||
sudo nix run github:nix-community/nixos-anywhere -- \
|
sudo nix run github:nix-community/nixos-anywhere -- \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue