about summary refs log tree commit diff
path: root/modules/common/networking.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-05-25 22:16:47 +0300
committerAzat Bahawi <azat@bahawi.net>2024-05-25 22:16:47 +0300
commit364e8a98ad25127f2a51696ec03729e3a783044f (patch)
tree1ac46553d1dca1259da539eddc7db100eaf5c137 /modules/common/networking.nix
parent2024-05-05 (diff)
2024-05-25
Diffstat (limited to '')
-rw-r--r--modules/common/networking.nix16
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/common/networking.nix b/modules/common/networking.nix
index 727def4..e891e58 100644
--- a/modules/common/networking.nix
+++ b/modules/common/networking.nix
@@ -18,7 +18,6 @@ in
       optional networkmanager.enable "/etc/NetworkManager/system-connections"
       ++ optional wireless.iwd.enable "/var/lib/iwd";
 
-    # TODO Switch to systemd-networkd.
     networking = mkMerge [
       {
         domain = my.domain.shire;
@@ -29,12 +28,11 @@ in
         # Remove default hostname mappings. This is required at least by the
         # current implementation of the monitoring module.
         hosts = {
-          "127.0.0.2" = mkForce [ ];
+          "127.0.0.1" = mkForce [ ];
           "::1" = mkForce [ ];
         };
 
         nameservers = mkDefault dns.const.quad9.default;
-        resolvconf.enable = true;
 
         useDHCP = false;
 
@@ -84,13 +82,17 @@ in
         }
       )
       (mkIf this.isHeadful {
-        interfaces = {
-          eth0.useDHCP = mkDefault true;
-          wlan0.useDHCP = mkDefault true;
-        };
+        interfaces.eth0.useDHCP = mkDefault true;
 
         networkmanager = {
           enable = mkDefault true;
+          unmanaged = [
+            "bridge"
+            "ethernet"
+            "loopback"
+            "wireguard"
+          ];
+          plugins = mkForce [ ];
           wifi.backend = "iwd";
         };
 

Consider giving Nix/NixOS a try! <3