{ config, pkgs, ... }: { imports = [ ./initrd-wireguard.nix ]; boot.initrd = { kernelModules = [ "r8169" ]; network = { enable = true; ssh = { enable = true; # Efforts are made to keep key secret (initrd-secrets) but best # to keep it different from hostkey ; thus different port too. port = 222; hostKeys = [ "/etc/nixos/secrets/initrd_ssh_host_ed25519_key" ]; authorizedKeys = config.users.extraUsers.asmadeus.openssh.authorizedKeys.keys ++ [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtS5YD+isGRgIOjVzMbXVQyD/44ZOFn6nvPbEAuAKoD asmadeus@jormungand-ullr" ]; }; # automatically prompt on login postCommands = '' echo "cryptsetup-askpass" >> /root/.profile ''; }; }; }