nixos/networkd: fix networking.networkd.static test

Commit ca58bd0a50 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.
main
Luflosi 2 years ago
parent e01fa67cdd
commit 64560de406
No known key found for this signature in database
GPG Key ID: 4E41E29EDCC345D0
  1. 2
      nixos/modules/tasks/network-interfaces-systemd.nix

@ -92,7 +92,7 @@ in
};
};
});
networks."40-${i.name}" = mkMerge [ (genericNetwork mkDefault) {
networks."40-${i.name}" = mkMerge [ (genericNetwork id) {
name = mkDefault i.name;
DHCP = mkForce (dhcpStr
(if i.useDHCP != null then i.useDHCP else false));

Loading…
Cancel
Save