diff options
author | Franck Cuny <franck@fcuny.net> | 2023-05-12 14:07:07 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-05-12 14:07:07 -0700 |
commit | dedafea9064419b7b2dcb190457450232a46cf0a (patch) | |
tree | bae38d282004a699269e5146ea8bea21094af34d /hosts/tahoe/default.nix | |
parent | hosts/aptos: move network configuration to default.nix (diff) | |
download | world-dedafea9064419b7b2dcb190457450232a46cf0a.tar.gz |
hosts/tahoe: move network configuration to default.nix
Diffstat (limited to 'hosts/tahoe/default.nix')
-rw-r--r-- | hosts/tahoe/default.nix | 22 |
1 files changed, 20 insertions, 2 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}"; |