nixos/networkd: continue supporting 99-main with wildcard interface match

With systemd version 243 network units with empty match block will
generate warnigs. The reasoning seems to be that the intended behaviour
is hard to infere. Being explicit about really meaning any interface is
the reasonable thing here.

We want to get rid of this mechanism in the long run but as long as we
do not have a replacement we should stick with it and keep it in
reasonable good shape.
wip/yesman
Andreas Rammhold 5 years ago
parent d9b1256f93
commit 2b605e96c2
No known key found for this signature in database
GPG Key ID: E432E410B5E48C86
  1. 10
      nixos/modules/tasks/network-interfaces-systemd.nix

@ -72,7 +72,15 @@ in
};
in mkMerge [ {
enable = true;
networks."99-main" = genericNetwork mkDefault;
networks."99-main" = (genericNetwork mkDefault) // {
# We keep the "broken" behaviour of applying this to all interfaces.
# In general we want to get rid of this workaround but there hasn't
# been any work on that.
# See the following issues for details:
# - https://github.com/NixOS/nixpkgs/issues/18962
# - https://github.com/NixOS/nixpkgs/issues/61629
matchConfig = mkDefault { Name = "*"; };
};
}
(mkMerge (forEach interfaces (i: {
netdevs = mkIf i.virtual ({

Loading…
Cancel
Save