hetzner-dedicated/zfs: Create host key for remote unlocking

This commit is contained in:
Akshay Mankar 2023-10-15 14:09:56 +02:00
parent f02ab059de
commit 4ab3453177
Signed by: axeman
GPG key ID: CA08F3AB62369B89

View file

@ -321,6 +321,9 @@ echo "Determined IP_V6 as $IP_V6"
read _ _ DEFAULT_GATEWAY _ < <(ip route list match 0/0); echo "$DEFAULT_GATEWAY"
echo "Determined DEFAULT_GATEWAY as $DEFAULT_GATEWAY"
mkdir -p /mnt/etc/secrets/initrd
ssh-keygen -t ed25519 -N "" -f /mnt/etc/secrets/initrd/ssh_host_ed25519_key
# Generate `configuration.nix`. Note that we splice in shell variables.
cat > /mnt/etc/nixos/configuration.nix <<EOF
{ config, pkgs, ... }: