nixos/legacy/modules/networkdecrypt.nix

23 lines
438 B
Nix
Raw Normal View History

2022-06-09 23:12:16 +02:00
{ pkgs, config, ... }:
2020-11-16 21:14:46 +01:00
{
boot.initrd.network = {
enable = true;
ssh = {
enable = true;
port = 2222;
hostKeys = [
"/etc/secrets/initrd/ssh_host_ed25519_key"
2020-11-16 21:14:46 +01:00
];
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOFx6OLwL9MbkD3mnMsv+xrzZHN/rwCTgVs758SCLG0h felix@thinkman"
];
};
postCommands = ''
echo 'cryptsetup-askpass' >> /root/.profile
'';
};
}