From 19b6fbef3c2470bbdd9236d1bc1d2998d6893991 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 22 Apr 2024 12:07:39 +0300 Subject: [PATCH] systemd-networkd: attempt to deduplicate by cutting into 10-global.network --- etc/systemd/network/10-ether.network | 21 ++---------------- etc/systemd/network/10-global.network | 32 +++++++++++++++++++++++++++ etc/systemd/network/10-wlan.network | 6 ----- 3 files changed, 34 insertions(+), 25 deletions(-) create mode 100644 etc/systemd/network/10-global.network diff --git a/etc/systemd/network/10-ether.network b/etc/systemd/network/10-ether.network index c313278a..762e7788 100644 --- a/etc/systemd/network/10-ether.network +++ b/etc/systemd/network/10-ether.network @@ -1,5 +1,4 @@ [Match] -#Name=* # Can be {colon,hyphen,dot}-delimited hexadecimal or IPv{4,6} address #MACAddress= Type=ether @@ -12,27 +11,11 @@ RequiredForOnline=false RequiredFamilyForOnline=both # Always set administrative state to up. Implies RequiredForOnline=true #ActivationPolicy=always-up -# Required for mDNS -Multicast=true [Network] #DHCP=true # /24, /16, /8 are the the class C, B, A networks Address=192.168.0.2/24 Gateway=192.168.0.1 -IPv6PrivacyExtensions=true -IPv6LinkLocalAddressGenerationMode=stable-privacy -# DNS has no effect unless systemd-resolved is used. Why would it be used? -# systemctl enable systemd-resolved && systemctl start systemd-resolved -# ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf -#DNS=127.0.0.1 -#DNS=::1 -#DNS=8.8.4.4 -# Enable systemd-timesyncd with `timedatectl set-ntp true`, may be specified -# multiple times, but you are using Chrony instead, right? -#NTP=fi.pool.ntp.org -#NTP=time.cloudflare.com -# Enable mDNS/.local for systemd-resolved -MulticastDNS=true -# Windows -LLMNR=true +#DNS= +#NTP= diff --git a/etc/systemd/network/10-global.network b/etc/systemd/network/10-global.network new file mode 100644 index 00000000..b583b6be --- /dev/null +++ b/etc/systemd/network/10-global.network @@ -0,0 +1,32 @@ +[Match] +Name=* + +[Link] +# required for mDNS +Multicast=true + +[Network] +# Enable privacy extensions +IPv6PrivacyExtensions=true +IPv6LinkLocalAddressGenerationMode=stable-privacy +# systemd-resolved configuration +DNSSEC=true +#DNSSEC=allow-downgrade +DNSOverTLS=true +#DNSOverTLS=opportunistic +# Search domains +Domains=. +# Enable mDNS/.local for systemd-resolved +MulticastDNS=true +# Windows +LLMNR=true +# DNS has no effect unless systemd-resolved is used. Why would it be used? +# systemctl enable systemd-resolved && systemctl start systemd-resolved +# ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf +#DNS=127.0.0.1 +#DNS=::1 +#DNS=8.8.4.4 +# Enable systemd-timesyncd with `timedatectl set-ntp true`, may be specified +# multiple times, but you are using Chrony instead, right? +#NTP=fi.pool.ntp.org +#NTP=time.cloudflare.com diff --git a/etc/systemd/network/10-wlan.network b/etc/systemd/network/10-wlan.network index 839ce67a..a0962fb8 100644 --- a/etc/systemd/network/10-wlan.network +++ b/etc/systemd/network/10-wlan.network @@ -17,9 +17,3 @@ Multicast=true [Network] DHCP=true -IPv6PrivacyExtensions=true -IPv6LinkLocalAddressGenerationMode=stable-privacy -# Enable mDNS/.local for systemd-resolved -MulticastDNS=true -# Windows -LLMNR=true