From e337aac7f1fe0d96e0b633a8cfaa8cc3709fbfb5 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 9 Jun 2022 23:12:16 +0200 Subject: [PATCH] initrd.network: use sops-nix --- nixos/modules/networkdecrypt.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/modules/networkdecrypt.nix b/nixos/modules/networkdecrypt.nix index 24e7f2c..8ab8433 100644 --- a/nixos/modules/networkdecrypt.nix +++ b/nixos/modules/networkdecrypt.nix @@ -1,6 +1,8 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { + sops.secrets.initrd_ssh_key = { }; + boot.initrd.network = { enable = true; @@ -8,7 +10,7 @@ enable = true; port = 2222; hostKeys = [ - /etc/secrets/initrd/ssh_host_ed25519_key + config.sops.secrets.initrd_ssh_key.path ]; authorizedKeys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOFx6OLwL9MbkD3mnMsv+xrzZHN/rwCTgVs758SCLG0h felix@thinkman"