From d7a2bf9d265d7e94211850f119d22014ae10842c Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 16 Jan 2024 06:09:19 +0000 Subject: [PATCH] servo: remove networking.useDHCP=false override seems likely that the change to systemd-networkd renamed the ethernet interface, and so eth0.useDHCP wasn't right. this change seems to restore networking --- hosts/by-name/servo/net.nix | 6 ------ hosts/modules/wg-home.nix | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/hosts/by-name/servo/net.nix b/hosts/by-name/servo/net.nix index 484c916ef..6531db8c4 100644 --- a/hosts/by-name/servo/net.nix +++ b/hosts/by-name/servo/net.nix @@ -24,12 +24,6 @@ in sane.ports.openFirewall = true; sane.ports.openUpnp = true; - # these useDHCP lines are legacy from the auto-generated config. might be safe to remove now? - networking.useDHCP = false; - networking.interfaces.eth0.useDHCP = true; - # XXX colin: probably don't need this. wlan0 won't be populated unless i touch a value in networking.interfaces.wlan0 - networking.wireless.enable = false; - # this is needed to forward packets from the VPN to the host boot.kernel.sysctl."net.ipv4.ip_forward" = 1; diff --git a/hosts/modules/wg-home.nix b/hosts/modules/wg-home.nix index 7b48709bf..b39155c9d 100644 --- a/hosts/modules/wg-home.nix +++ b/hosts/modules/wg-home.nix @@ -110,6 +110,7 @@ in } (lib.mkIf cfg.forwardToWan { # documented here: + # TODO: don't hardcode eth0! postSetup = '' ${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s ${cfg.ip}/24 -o eth0 -j MASQUERADE '';