boot.initrd.systemd: also enable if initrd networkd is used

This commit is contained in:
Jörg Thalheim 2023-11-19 16:00:56 +01:00 committed by mergify[bot]
parent c89d0acb7c
commit b41442d517
2 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,6 @@
# - systems with raids as this currently require manual configuration (https://github.com/NixOS/nixpkgs/issues/210210)
# - for containers we currently rely on the `stage-2` init script that sets up our /etc
boot.initrd.systemd.enable = lib.mkDefault (
!config.boot.initrd.network.enable &&
!(if lib.versionAtLeast (lib.versions.majorMinor lib.version) "23.11" then
config.boot.swraid.enable
else

View File

@ -38,5 +38,8 @@
networkConfig.Gateway = "fe80::1";
networkConfig.IPv6AcceptRA = "no";
};
# Network configuration i.e. when we unlock machines with openssh in the initrd
boot.initrd.systemd.network.networks."10-uplink" = config.systemd.network.networks."10-uplink";
};
}