about summary refs log tree commit diff
path: root/hosts/aptos/networking.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-05 17:27:04 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-05 17:27:04 -0700
commit35e8b8b78d4ad3b8002b922bc0a9f9dcbcf47351 (patch)
tree532c717f6a83d19c84d05c0cecd4e90c693bef58 /hosts/aptos/networking.nix
parentssh: refactor to a module (diff)
downloadworld-35e8b8b78d4ad3b8002b922bc0a9f9dcbcf47351.tar.gz
network: move tailscale in modules
Move the networking configuration for the hosts to its own file.
Diffstat (limited to 'hosts/aptos/networking.nix')
-rw-r--r--hosts/aptos/networking.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/hosts/aptos/networking.nix b/hosts/aptos/networking.nix
new file mode 100644
index 0000000..ed5e175
--- /dev/null
+++ b/hosts/aptos/networking.nix
@@ -0,0 +1,22 @@
+{ ... }: {
+  # Use systemd-networkd for networking
+  systemd.network = {
+    enable = true;
+    networks = {
+      wlan0 = {
+        matchConfig.Name = "wlan0";
+        networkConfig = { DHCP = "yes"; };
+        extraConfig = ''
+          [DHCPv4]
+          UseDNS=yes
+          UseDomains=yes
+        '';
+      };
+    };
+  };
+
+  networking.wireless.iwd.enable = true;
+  networking.private-wireguard.enable = true;
+
+  my.services.tailscale.enable = true;
+}