From c42d36bb5e0ee8aab76a34256b32621d09d095c9 Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 29 Apr 2022 18:12:46 +0200 Subject: [PATCH] Prioritize ethernet over WiFi --- modules/networking.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/networking.nix b/modules/networking.nix index 1c79913..7aa1269 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -21,6 +21,10 @@ }; systemd.services."systemd-networkd-wait-online".enable = false; + # Prioritize ethernet over WiFi + systemd.network.networks."40-enp0s31f6".dhcpV4Config.RouteMetric = 10; + systemd.network.networks."40-wlan0".dhcpV4Config.RouteMetric = 20; + # Static IP for home network systemd.network.networks."24-home" = { name = "wlan0";