1

Lib: Update systemd network functions

This commit is contained in:
2025-06-01 20:25:07 +02:00
parent eea481a2dd
commit 0e8e2fae2e

View File

@ -39,12 +39,11 @@
mkStaticSystemdNetwork = { mkStaticSystemdNetwork = {
interface, interface,
ip, ips,
router, routers,
nameserver, nameservers,
routable, routable,
}: { }: {
# name = "enp0s31f6"; # Network interface name?
enable = true; enable = true;
# See man systemd.link, man systemd.netdev, man systemd.network # See man systemd.link, man systemd.netdev, man systemd.network
@ -54,26 +53,20 @@
}; };
# Static IP + DNS + Gateway # Static IP + DNS + Gateway
address = ip; address = ips;
gateway = router; gateway = routers;
dns = nameserver; dns = nameservers;
routes = builtins.map (r: {Gateway = r;}) routers;
# routes = [
# {
# routeConfig.Gateway = (lib.head router);
# }
# ];
# See man systemd.network # See man systemd.network
networkConfig = { networkConfig = {
# This corresponds to the [NETWORK] section # This corresponds to the [NETWORK] section
DHCP = "no"; DHCP = "no";
# TODO: What does this all do? # IPv6AcceptRA = "no";
# IPv6AcceptRA = true; # MulticastDNS = "no";
# MulticastDNS = "yes"; # Needed? # LLMNR = "no";
# LLMNR = "no"; # Needed? # LinkLocalAddressing = "ipv6";
# LinkLocalAddressing = "no"; # Needed?
}; };
linkConfig = { linkConfig = {