0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

nixos/network-interfaces-systemd: remove unused arg in genericDhcpNetworks (#376959)

This commit is contained in:
Florian Klink 2025-01-26 23:18:42 +02:00 committed by GitHub
commit 7f4f965d73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,28 +53,26 @@ let
)
);
genericDhcpNetworks =
initrd:
mkIf cfg.useDHCP {
networks."99-ethernet-default-dhcp" = {
matchConfig = {
Type = "ether";
Kind = "!*"; # physical interfaces have no kind
};
DHCP = "yes";
networkConfig.IPv6PrivacyExtensions = "kernel";
};
networks."99-wireless-client-dhcp" = {
matchConfig.WLANInterfaceType = "station";
DHCP = "yes";
networkConfig.IPv6PrivacyExtensions = "kernel";
# We also set the route metric to one more than the default
# of 1024, so that Ethernet is preferred if both are
# available.
dhcpV4Config.RouteMetric = 1025;
ipv6AcceptRAConfig.RouteMetric = 1025;
genericDhcpNetworks = mkIf cfg.useDHCP {
networks."99-ethernet-default-dhcp" = {
matchConfig = {
Type = "ether";
Kind = "!*"; # physical interfaces have no kind
};
DHCP = "yes";
networkConfig.IPv6PrivacyExtensions = "kernel";
};
networks."99-wireless-client-dhcp" = {
matchConfig.WLANInterfaceType = "station";
DHCP = "yes";
networkConfig.IPv6PrivacyExtensions = "kernel";
# We also set the route metric to one more than the default
# of 1024, so that Ethernet is preferred if both are
# available.
dhcpV4Config.RouteMetric = 1025;
ipv6AcceptRAConfig.RouteMetric = 1025;
};
};
interfaceNetworks = mkMerge (
forEach interfaces (i: {
@ -220,7 +218,7 @@ in
# former, the user retains full control over the configuration.
boot.initrd.systemd.network = mkMerge [
defaultGateways
(genericDhcpNetworks true)
genericDhcpNetworks
interfaceNetworks
bridgeNetworks
vlanNetworks
@ -271,7 +269,7 @@ in
enable = true;
}
defaultGateways
(genericDhcpNetworks false)
genericDhcpNetworks
interfaceNetworks
bridgeNetworks
(mkMerge (