initrd: fix network
This commit is contained in:
parent
ccd6290fb7
commit
b8c31b4e4a
|
@ -43,7 +43,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Interfaces on the machine
|
# Interfaces on the machine
|
||||||
networks."10-ether-bond" = {
|
networks."10-wired-default" = {
|
||||||
matchConfig.Name = "ens18";
|
matchConfig.Name = "ens18";
|
||||||
|
|
||||||
address = [ "141.30.30.169/25" ];
|
address = [ "141.30.30.169/25" ];
|
||||||
|
|
|
@ -3,16 +3,25 @@
|
||||||
# Generate another SSH host key for the machine:
|
# Generate another SSH host key for the machine:
|
||||||
# $ ssh-keygen -t ed25519 -N "" -f /etc/ssh/ssh_host_ed25519_key_initrd -C HOSTNAME-initrd
|
# $ ssh-keygen -t ed25519 -N "" -f /etc/ssh/ssh_host_ed25519_key_initrd -C HOSTNAME-initrd
|
||||||
# Add the public key to your known_hosts and create an ssh config entry.
|
# Add the public key to your known_hosts and create an ssh config entry.
|
||||||
{ ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
boot.initrd.network = {
|
boot.initrd = {
|
||||||
enable = true;
|
systemd = {
|
||||||
ssh = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
port = 222;
|
network = {
|
||||||
shell = "/bin/cryptsetup-askpass";
|
enable = true;
|
||||||
hostKeys = [ "/etc/ssh/ssh_host_ed25519_key_initrd" ];
|
networks."10-wired-default" = config.systemd.network.networks."10-wired-default";
|
||||||
# authorizedKeys option inherits root's authorizedKeys.keys, but not keyFiles
|
};
|
||||||
|
users.root.shell = "/bin/cryptsetup-askpass";
|
||||||
|
};
|
||||||
|
network = {
|
||||||
|
enable = true;
|
||||||
|
ssh = {
|
||||||
|
enable = true;
|
||||||
|
port = 222;
|
||||||
|
hostKeys = [ "/etc/ssh/ssh_host_ed25519_key_initrd" ];
|
||||||
|
# authorizedKeys option inherits root's authorizedKeys.keys, but not keyFiles
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue