nixos/networkd: fix networking.networkd.static test
Commit ca58bd0a50f38de43b401df716806c0f83479a8e broke the test networking.networkd.static. This happened because the test sets `networking.defaultGateway`. This is implemented by adding the gateway to the list of `routes` using `mkDefault`. The `routes` are then overridden by an empty list in the newly added code. Replace `mkDefault` with `id` so the two lists are merged and everything (hopefully) works as expected.
See https://github.com/NixOS/nixpkgs/pull/144590 for a more context.
commit64560de406ec701e26f286163a8d775ed2d0f8b6
authorLuflosi <luflosi@luflosi.de>
dateFri 21 Jan 2022, 18:45 (5 years ago)
parente01fa67
nixos/modules/tasks/network-interfaces-systemd.nix+1−1
@@ -92,7 +92,7 @@ in
9292 };
9393 };
9494 });
95− networks."40-${i.name}" = mkMerge [ (genericNetwork mkDefault) {
95+ networks."40-${i.name}" = mkMerge [ (genericNetwork id) {
9696 name = mkDefault i.name;
9797 DHCP = mkForce (dhcpStr
9898 (if i.useDHCP != null then i.useDHCP else false));