From 1931cd38b9cb68a64424ebb95285ca641c945fa1 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Thu, 4 Jul 2024 23:02:06 +0530 Subject: [PATCH] rico0: replace networkmanager with systemd-networkd --- hosts/rico0/network.nix | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/hosts/rico0/network.nix b/hosts/rico0/network.nix index d15c672..5b28e8f 100644 --- a/hosts/rico0/network.nix +++ b/hosts/rico0/network.nix @@ -7,14 +7,32 @@ "2620:fe::9#dns.quad9.net" "149.112.112.112#dns.quad9.net" ]; - - networkmanager = { - enable = true; - dhcp = "dhcpcd"; - dns = "systemd-resolved"; - }; - useDHCP = lib.mkDefault false; + useNetworkd = true; + }; + + systemd.network = { + enable = true; + networks = { + "41-ether" = { + enable = true; + matchConfig = { + Type = "ether"; + }; + networkConfig = { + DHCP = "yes"; + }; + dhcpV4Config = { + UseDomains = true; + }; + ipv6AcceptRAConfig = { + UseDomains = true; + }; + linkConfig = { + RequiredForOnline = "yes"; + }; + }; + }; }; services.resolved = {