From 8df38b9ca655e553985444b2f329e976fd664eea Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Sat, 21 Oct 2023 21:48:11 +0200 Subject: use systemd-networkd --- common.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'common.nix') diff --git a/common.nix b/common.nix index eded544..332e36f 100644 --- a/common.nix +++ b/common.nix @@ -64,9 +64,21 @@ in # allow all firmware hardware.enableAllFirmware = true; - # use NetworkManager + # use systemd-networkd networking.useDHCP = false; - networking.networkmanager.enable = true; + systemd.network = { + enable = true; + networks."10-wan" = { + networkConfig = { + # start a DHCP Client for IPv4 Addressing/Routing + DHCP = "ipv4"; + # accept Router Advertisements for Stateless IPv6 Autoconfiguraton (SLAAC) + IPv6AcceptRA = true; + }; + # make routing on this interface a dependency for network-online.target + linkConfig.RequiredForOnline = "routable"; + }; + }; # ensure firewall is up, allow ssh and http in networking.firewall.enable = true; -- cgit v1.2.3