about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--hosts/aptos/default.nix21
-rw-r--r--hosts/aptos/networking.nix29
2 files changed, 19 insertions, 31 deletions
diff --git a/hosts/aptos/default.nix b/hosts/aptos/default.nix
index b2236f5..6b7f695 100644
--- a/hosts/aptos/default.nix
+++ b/hosts/aptos/default.nix
@@ -1,4 +1,4 @@
-{ self, config, ... }:
+{ self, config, lib, ... }:
 let
   secrets = config.age.secrets;
   ssh-key-path = secrets."restic/ssh-key".path;
@@ -6,7 +6,6 @@ in
 {
   imports = [
     ./hardware.nix
-    ./networking.nix
     "${self}/profiles/btrfs.nix"
     "${self}/profiles/documentation.nix"
     "${self}/profiles/laptop.nix"
@@ -14,6 +13,24 @@ in
     "${self}/profiles/hardware/xps9300.nix"
   ];
 
+  # Use systemd-networkd for networking
+  systemd.network.enable = true;
+  systemd.network.networks.wlan0 = {
+    matchConfig.Name = "wlan0";
+    networkConfig.DHCP = "yes";
+    dhcpV4Config = {
+      UseDNS = "yes";
+      UseDomains = "yes";
+    };
+  };
+
+  networking.useNetworkd = true;
+  networking.useDHCP = false;
+  networking.private-wireguard.enable = true;
+
+  services.nscd.enable = false;
+  system.nssModules = lib.mkForce [ ];
+
   my.services.backup = {
     enable = true;
     repository = "sftp:192.168.6.40:/${config.networking.hostName}";
diff --git a/hosts/aptos/networking.nix b/hosts/aptos/networking.nix
deleted file mode 100644
index 84c32e5..0000000
--- a/hosts/aptos/networking.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ lib, ... }:
-
-{
-  # Use systemd-networkd for networking
-  systemd.network = {
-    enable = true;
-    networks = {
-      wlan0 = {
-        matchConfig.Name = "wlan0";
-        networkConfig = { DHCP = "yes"; };
-        extraConfig = ''
-          [DHCPv4]
-          UseDNS=yes
-          UseDomains=yes
-        '';
-      };
-    };
-  };
-
-  networking = {
-    hostName = "aptos";
-    useNetworkd = true;
-    useDHCP = false;
-    private-wireguard.enable = true;
-  };
-
-  services.nscd.enable = false;
-  system.nssModules = lib.mkForce [ ];
-}