From 2f4207926559b314d5fe59bc7888bb65da700a90 Mon Sep 17 00:00:00 2001 From: niten Date: Thu, 14 Oct 2021 16:36:30 -0700 Subject: [PATCH] Try again at using secrets --- lib/fudo/initrd-network.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/fudo/initrd-network.nix b/lib/fudo/initrd-network.nix index 53cceb1..1ced6e2 100644 --- a/lib/fudo/initrd-network.nix +++ b/lib/fudo/initrd-network.nix @@ -43,7 +43,7 @@ in { ]; initrd = let host-key-pkg = host-keys.${config.instance.hostname}; - host-privkey = "${host-key-pkg}/ssh_host_ed25519_key"; + host-privkey = toPath "${host-key-pkg}/ssh_host_ed25519_key"; in { network = { enable = true; @@ -57,8 +57,11 @@ in { port = 22; authorizedKeys = admin-ssh-keys; hostKeys = [ - host-privkey + "/var/run/ssh-host-key" ]; + secrets = { + "/var/run/ssh-host-key" = host-privkey; + }; }; }; };