diff options
Diffstat (limited to '')
-rw-r--r-- | hosts/tahoe/default.nix | 22 | ||||
-rw-r--r-- | hosts/tahoe/networking.nix | 30 |
2 files changed, 20 insertions, 32 deletions
diff --git a/hosts/tahoe/default.nix b/hosts/tahoe/default.nix index ade4b5b..2c4d8ec 100644 --- a/hosts/tahoe/default.nix +++ b/hosts/tahoe/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hostname, self, ... }: +{ config, pkgs, hostname, lib, self, ... }: let secrets = config.age.secrets; in @@ -6,7 +6,6 @@ in imports = [ ./boot.nix ./hardware.nix - ./networking.nix ./services.nix "${self}/profiles/btrfs.nix" "${self}/profiles/nas.nix" @@ -20,6 +19,25 @@ in "${self}/profiles/hardware/amd.nix" ]; + # Use systemd-networkd for networking + systemd.network.enable = true; + systemd.network.networks.enp42s0 = { + matchConfig.Name = "enp42s0"; + networkConfig.DHCP = "yes"; + dhcpV4Config = { + UseDNS = "yes"; + UseDomains = "yes"; + }; + }; + + networking.useNetworkd = true; + networking.useDHCP = false; + networking.firewall.enable = false; + networking.private-wireguard.enable = true; + + services.nscd.enable = false; + system.nssModules = lib.mkForce [ ]; + my.services.backup = { enable = true; repository = "/data/slow/backups/hosts/${config.networking.hostName}"; diff --git a/hosts/tahoe/networking.nix b/hosts/tahoe/networking.nix deleted file mode 100644 index 8ea6667..0000000 --- a/hosts/tahoe/networking.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib, ... }: - -{ - # Use systemd-networkd for networking - systemd.network = { - enable = true; - networks = { - enp42s0 = { - matchConfig.Name = "enp42s0"; - networkConfig = { DHCP = "yes"; }; - extraConfig = '' - [DHCPv4] - UseDNS=yes - UseDomains=yes - ''; - }; - }; - }; - - networking = { - hostName = "tahoe"; - useNetworkd = true; - useDHCP = false; - private-wireguard.enable = true; - firewall.enable = false; - }; - - services.nscd.enable = false; - system.nssModules = lib.mkForce [ ]; -} |