From 593ec35d7daae320ee58464c8fd039453027fc0c Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 5 Apr 2024 00:02:16 +0000 Subject: Use networkd for IPv4 DHCP solicitation --- machines/lapin.nix | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'machines') diff --git a/machines/lapin.nix b/machines/lapin.nix index 6115145..91eccba 100644 --- a/machines/lapin.nix +++ b/machines/lapin.nix @@ -2,34 +2,23 @@ { networking = { - # Previously Hetzer didn't really work with simple DHCP, - # now it does?? I think?? Either way I'll leave the static - # networkd configuration below. - useDHCP = true; + # Network configuration is managed with networkd. + useDHCP = false; nameservers = [ "1.1.1.1" "1.0.0.1" "2606:4700:4700::1111" "2606:4700:4700::1001" ]; }; - - # Legacy networkd static network configuration, - # Maybe will be needed again? - - # systemd.network.enable = true; - # systemd.network.networks."10-wan" = { - # name = "enp1s0"; - # DHCP = "yes"; - # address = [ - # "2a01:4f8:c012:9493::1" - # "138.201.117.99" - # ]; - # routes = [ - # { routeConfig.Gateway = "fe80::1"; } - # { routeConfig.Destination = "172.31.1.1"; } - # { routeConfig = { Gateway = "172.31.1.1"; GatewayOnLink = true; }; } - # ]; - # }; + # Static IPv6 network configuration + # + soliciting of IPv4 via DHCP. + systemd.network.enable = true; + systemd.network.networks."10-wan" = { + name = "enp1s0"; + DHCP = "ipv4"; + address = [ "2a01:4f8:c012:9493::1" ]; + routes = [ { routeConfig.Gateway = "fe80::1"; } ]; + }; services.resolved = { # LLMNR and MulticastDNS both give DNS timeouts. -- cgit 1.4.1