2021-01-07 13:39:25 +01:00
|
|
|
# For network to work in initrd, either pass the `ip=` kernel parameter or
|
|
|
|
# enable networking.useDHCP. You also have to add the required kernel modules
|
|
|
|
# for the network card to boot.initrd.availableKernelModules. Also see the
|
|
|
|
# instructions on how to add a host key to password-store.
|
|
|
|
{ config, lib, ... }:
|
|
|
|
{
|
|
|
|
boot.initrd.network = {
|
|
|
|
#enable = true;
|
|
|
|
ssh = {
|
|
|
|
enable = lib.mkDefault config.boot.initrd.network.enable;
|
|
|
|
port = 2222;
|
2021-04-06 11:45:04 +02:00
|
|
|
# ssh-keygen -t ed25519 -N "" -f ssh_host_ed25519_key_initrd -C HOSTNAME
|
|
|
|
# scp ssh_host_ed25519_key_initrd root@machine:/etc/ssh/
|
2021-01-07 13:39:25 +01:00
|
|
|
hostKeys = [
|
2021-04-06 11:45:04 +02:00
|
|
|
"/etc/ssh/ssh_host_ed25519_key_initrd"
|
2021-01-07 13:39:25 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|