From 35e8b8b78d4ad3b8002b922bc0a9f9dcbcf47351 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 5 Apr 2022 17:27:04 -0700 Subject: network: move tailscale in modules Move the networking configuration for the hosts to its own file. --- hosts/aptos/default.nix | 21 +-------------------- hosts/aptos/networking.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 20 deletions(-) create mode 100644 hosts/aptos/networking.nix (limited to 'hosts/aptos') diff --git a/hosts/aptos/default.nix b/hosts/aptos/default.nix index 95f4b81..b596f30 100644 --- a/hosts/aptos/default.nix +++ b/hosts/aptos/default.nix @@ -4,8 +4,8 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ./sound.nix + ./networking.nix ../common/desktop - ../common/system/tailscale.nix ../common/hardware/xps9300.nix ]; @@ -22,25 +22,6 @@ }; }; - # 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; - services.thermald.enable = true; # This value determines the NixOS release from which the default 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; +} -- cgit 1.4.1