nixos/ifstate: load kernel modules required for networking

This commit is contained in:
Marcel
2025-11-29 12:37:48 +01:00
parent 3a0b463b32
commit f73ef8f753
3 changed files with 12 additions and 0 deletions
@@ -28,6 +28,9 @@ in
};
boot.initrd = {
# otherwise the interfaces do not get created
kernelModules = [ "virtio_net" ];
network = {
enable = true;
ifstate = lib.mkMerge [
@@ -46,6 +49,7 @@ in
}
];
};
systemd = {
enable = true;
network.enable = false;
+4
View File
@@ -62,6 +62,9 @@ in
};
boot.initrd = {
# otherwise the interfaces do not get created
kernelModules = [ "virtio_net" ];
network = {
enable = true;
ifstate =
@@ -76,6 +79,7 @@ in
allowIfstateToDrasticlyIncreaseInitrdSize = true;
};
};
systemd = {
enable = true;
network.enable = false;
+4
View File
@@ -26,12 +26,16 @@ in
};
boot.initrd = {
# otherwise the interfaces do not get created
kernelModules = [ "virtio_net" ];
network = {
enable = true;
ifstate = mkIfStateConfig 1 // {
allowIfstateToDrasticlyIncreaseInitrdSize = true;
};
};
systemd = {
enable = true;
network.enable = false;