about summary refs log tree commit diff
path: root/nixos/modules/virtualisation/azure-image.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/virtualisation/azure-image.nix')
-rw-r--r--nixos/modules/virtualisation/azure-image.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/modules/virtualisation/azure-image.nix b/nixos/modules/virtualisation/azure-image.nix
index 1013396c0498..024be4a51163 100644
--- a/nixos/modules/virtualisation/azure-image.nix
+++ b/nixos/modules/virtualisation/azure-image.nix
@@ -98,8 +98,8 @@ in
   systemd.services.fetch-ssh-keys =
     { description = "Fetch host keys and authorized_keys for root user";
 
-      wantedBy = [ "sshd.service" ];
-      before = [ "sshd.service" ];
+      wantedBy = [ "sshd.service" "waagent.service" ];
+      before = [ "sshd.service" "waagent.service" ];
       after = [ "local-fs.target" ];
 
       path  = [ pkgs.coreutils ];
@@ -108,14 +108,14 @@ in
           eval "$(base64 --decode /metadata/CustomData.bin)"
           if ! [ -z "$ssh_host_ecdsa_key" ]; then
             echo "downloaded ssh_host_ecdsa_key"
-            echo "$ssh_host_ecdsa_key" > /etc/ssh/ssh_host_ecdsa_key
-            chmod 600 /etc/ssh/ssh_host_ecdsa_key
+            echo "$ssh_host_ecdsa_key" > /etc/ssh/ssh_host_ed25519_key
+            chmod 600 /etc/ssh/ssh_host_ed25519_key
           fi
 
           if ! [ -z "$ssh_host_ecdsa_key_pub" ]; then
             echo "downloaded ssh_host_ecdsa_key_pub"
-            echo "$ssh_host_ecdsa_key_pub" > /etc/ssh/ssh_host_ecdsa_key.pub
-            chmod 644 /etc/ssh/ssh_host_ecdsa_key.pub
+            echo "$ssh_host_ecdsa_key_pub" > /etc/ssh/ssh_host_ed25519_key.pub
+            chmod 644 /etc/ssh/ssh_host_ed25519_key.pub
           fi
 
           if ! [ -z "$ssh_root_auth_key" ]; then