From 4b998d179f2420cc9844a6a7634ad10e6c090aa4 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Wed, 21 Aug 2024 19:46:27 +0200 Subject: [PATCH] nixos/systemd.network: add support for UseDomains= in [Network] sections Those options were also added with systemd 256, but sadly were missed out in #307068. These options are documented in: - [systemd 256 changelog](https://github.com/systemd/systemd/releases/tag/v256) (search for `UseDomains=`) - [networkd.conf(5)](https://www.freedesktop.org/software/systemd/man/256/networkd.conf.html#UseDomains=) - [systemd.network(5)](https://www.freedesktop.org/software/systemd/man/256/systemd.network.html#UseDomains=) --- nixos/modules/system/boot/networkd.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 43fa93aadf1c2..620e4167daa1a 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -20,6 +20,7 @@ let "IPv6PrivacyExtensions" "IPv4Forwarding" "IPv6Forwarding" + "UseDomains" ]) (assertValueOneOf "SpeedMeter" boolValues) (assertInt "SpeedMeterIntervalSec") @@ -28,6 +29,7 @@ let (assertValueOneOf "IPv6PrivacyExtensions" (boolValues ++ ["prefer-public" "kernel"])) (assertValueOneOf "IPv4Forwarding" boolValues) (assertValueOneOf "IPv6Forwarding" boolValues) + (assertValueOneOf "UseDomains" (boolValues ++ ["route"])) ]; sectionDHCPv4 = checkUnitConfig "DHCPv4" [ @@ -652,6 +654,7 @@ let "Address" "Gateway" "DNS" + "UseDomains" "Domains" "DNSDefaultRoute" "NTP" @@ -705,6 +708,7 @@ let (assertValueOneOf "DNSSEC" (boolValues ++ ["allow-downgrade"])) (assertValueOneOf "LLDP" (boolValues ++ ["routers-only"])) (assertValueOneOf "EmitLLDP" (boolValues ++ ["nearest-bridge" "non-tpmr-bridge" "customer-bridge"])) + (assertValueOneOf "UseDomains" (boolValues ++ ["route"])) (assertValueOneOf "DNSDefaultRoute" boolValues) (assertRemoved "IPForward" "IPv4Forwarding and IPv6Forwarding in systemd.network(5) and networkd.conf(5)") (assertValueOneOf "IPv4Forwarding" boolValues)