2024-06-25 05:23:53 +02:00
|
|
|
{ ... }: {
|
2023-12-17 12:52:40 +01:00
|
|
|
# https://nixos.wiki/wiki/Remote_LUKS_Unlocking
|
|
|
|
# Unlock command:
|
|
|
|
# ssh root@<Local_IP_Address> "Password"
|
|
|
|
|
|
|
|
boot.kernelParams = [ "ip=dhcp" ];
|
|
|
|
|
|
|
|
boot.initrd = {
|
|
|
|
enable = true;
|
|
|
|
systemd.users.root.shell = "/bin/systemd-tty-ask-password-agent";
|
|
|
|
availableKernelModules = [ "cdc_ncm" ];
|
|
|
|
network.enable = true;
|
|
|
|
network.ssh = {
|
|
|
|
enable = true;
|
|
|
|
port = 22;
|
|
|
|
authorizedKeys = [
|
2023-12-28 12:06:15 +01:00
|
|
|
# (Thu Dec 28 19:30:06 JST 2023) albert@framework-server
|
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAODamRCvyVOGmMSMXWdUzjcM2GsApizCvXEWKHiKhGk albert@framework-server''
|
2023-12-17 12:52:40 +01:00
|
|
|
# (Fri Dec 15 09:34:02 AM UTC 2023) albert@piaware-rpi4
|
2023-12-28 12:06:15 +01:00
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINR8PCfKOTArLemqmnHom4vWJ6u8wrlpG6/gSqeYo/qD albert@piaware-rpi4''
|
2023-12-17 12:52:40 +01:00
|
|
|
# (Fri Dec 15 11:40:53 AM UTC 2023) albert@backups-rpi4
|
2023-12-28 12:06:15 +01:00
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGNkKoS32K487JaFza9TUFwrjwe9P7SNIHbVNxhzmRcI albert@backups-rpi4''
|
2024-01-14 05:10:21 +01:00
|
|
|
# (Tue Jan 09 21:06:13 PM JST 2024) albert@win10-desktop
|
2024-01-22 14:12:47 +01:00
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKLHGSk3WffS/mrSeehcM4O9eBx5cp7IMNYc842xprr3 albert@win10-desktop''
|
2024-02-25 05:40:56 +01:00
|
|
|
# (Tue Feb 20 09:20:39 PM JST 2024) albert@nixos-framework
|
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMAJLaC+NJQYfrWlerUj8yMkAIofBGMOWQB4mU/ncDpz albert@nixos-framework''
|
2024-07-08 12:16:28 +02:00
|
|
|
# (Sat Apr 27 05:28:13 PM PDT 2024) albert@bakersfield-rpi4
|
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJm3bTcalJgoZt7t5FqFrJl7ZYlC09ew2QWUVF6w1Iih albert@bakersfield-rpi4''
|
|
|
|
|
2023-12-17 12:52:40 +01:00
|
|
|
];
|
|
|
|
hostKeys = [
|
|
|
|
# Generate new keys with:
|
2024-06-25 05:23:53 +02:00
|
|
|
# CAUTION: You WANT to generate a new key. This is stored plaintext in /boot
|
2023-12-17 12:52:40 +01:00
|
|
|
# ssh-keygen -t rsa -N "" -f /boot/ssh_host_rsa_key
|
|
|
|
"/boot/ssh_host_rsa_key"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-02-25 05:40:56 +01:00
|
|
|
}
|