From d3f4230f4d27aa26d802ac9b46d3759d9b341e52 Mon Sep 17 00:00:00 2001
From: Gabriel Arazas <foodogsquared@foodogsquared.one>
Date: Mon, 23 Sep 2024 10:05:54 +0800
Subject: [PATCH] hosts/plover/services/networking: fix config

---
 .../plover/modules/services/networking.nix    | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/configs/nixos/plover/modules/services/networking.nix b/configs/nixos/plover/modules/services/networking.nix
index 2160965b..76a3d8f8 100644
--- a/configs/nixos/plover/modules/services/networking.nix
+++ b/configs/nixos/plover/modules/services/networking.nix
@@ -74,24 +74,24 @@ in
           address = [ "${wan.ipv6}/64" ];
           gateway = [ wan.ipv6Gateway ];
 
+          dns = [
+            "2a01:4ff:ff00::add:2"
+            "2a01:4ff:ff00::add:1"
+          ]
+          ++ lib.optionals hostCfg.services.dns-server.enable [
+            wan.ipv4
+            wan.ipv6
+          ];
+
           # Setting up some other networking thingy.
           domains = [ config.networking.domain ];
           networkConfig = {
-            # IPv6 has to be manually configured.
             DHCP = "ipv4";
-            IPForward = true;
+            IPv4Forwarding = true;
+            IPv6Forwarding = true;
 
             LinkLocalAddressing = "ipv6";
             IPv6AcceptRA = true;
-
-            DNS = [
-              # The custom DNS servers.
-              wan.ipv4
-              wan.ipv6
-
-              "2a01:4ff:ff00::add:2"
-              "2a01:4ff:ff00::add:1"
-            ];
           };
         };