From aaaa3f108f9733f9d3271e53624f1f456147efdc Mon Sep 17 00:00:00 2001 From: Kabbone Date: Thu, 22 Aug 2024 19:42:25 +0200 Subject: [PATCH] hosts: nasbak: switch to systemd-networkd --- hosts/nasbackup/hardware-configuration.nix | 41 ++++++++-------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/hosts/nasbackup/hardware-configuration.nix b/hosts/nasbackup/hardware-configuration.nix index 94a992d..7acdee4 100644 --- a/hosts/nasbackup/hardware-configuration.nix +++ b/hosts/nasbackup/hardware-configuration.nix @@ -197,35 +197,24 @@ swapDevices = [ { device = "/swap/swapfile"; } ]; + systemd.network = { + enable = true; + networks = { + "10-lan" = { + matchConfig.Name = "enp6s18"; + ntp = [ "192.168.2.1" ]; + #domains = [ "home.opel-online.de" ]; + networkConfig = { + DHCP = "yes"; + IPv6AcceptRA = true; + }; + }; + }; + }; networking = { hostName = "nasbak"; domain = "home.opel-online.de"; - networkmanager = { - enable = false; - }; - timeServers = [ - "192.168.2.1" - ]; - interfaces = { - enp6s18 = { - useDHCP = true; # For versatility sake, manually edit IP on nm-applet. -# ipv4.addresses = [ { -# address = "45.142.114.153"; -# prefixLength = 24; -# } ]; -# ipv6.addresses = [ { -# address = "2a00:ccc1:101:19D::2"; -# prefixLength = 64; -# } ]; -# }; - }; - }; -# defaultGateway = "45.142.114.1"; - defaultGateway6 = { - address = "fe80::1"; - interface = "enp6s18"; - }; -# nameservers = [ "9.9.9.9" "2620:fe::fe" ]; + useDHCP = false; # For versatility sake, manually edit IP on nm-applet. #firewall = { # enable = false; # #allowedUDPPorts = [ 53 67 ];