From ab9873380ea37035686e29dcbf4600846b72a40e Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 1 Jun 2025 20:25:07 +0200 Subject: [PATCH] Lib: Update systemd network functions --- lib/networking.nix | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/lib/networking.nix b/lib/networking.nix index 3e7b29e2..04bda651 100644 --- a/lib/networking.nix +++ b/lib/networking.nix @@ -39,12 +39,11 @@ mkStaticSystemdNetwork = { interface, - ip, - router, - nameserver, + ips, + routers, + nameservers, routable, }: { - # name = "enp0s31f6"; # Network interface name? enable = true; # See man systemd.link, man systemd.netdev, man systemd.network @@ -54,26 +53,20 @@ }; # Static IP + DNS + Gateway - address = ip; - gateway = router; - dns = nameserver; - - # routes = [ - # { - # routeConfig.Gateway = (lib.head router); - # } - # ]; + address = ips; + gateway = routers; + dns = nameservers; + routes = builtins.map (r: {Gateway = r;}) routers; # See man systemd.network networkConfig = { # This corresponds to the [NETWORK] section DHCP = "no"; - # TODO: What does this all do? - # IPv6AcceptRA = true; - # MulticastDNS = "yes"; # Needed? - # LLMNR = "no"; # Needed? - # LinkLocalAddressing = "no"; # Needed? + # IPv6AcceptRA = "no"; + # MulticastDNS = "no"; + # LLMNR = "no"; + # LinkLocalAddressing = "ipv6"; }; linkConfig = {