lib/home: Centralise advertised search domains

radvd's DNSSL and kea's domain-search hardcoded the same list of
search domains in two places. Hoist it to lib.my.c.home.searchDomains
so there is a single source of truth (and so other consumers, such as
statically-configured boxes, can reuse it). No change to what is
advertised.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-02 22:04:34 +01:00
parent 000c03d3c1
commit 26e6870337
3 changed files with 8 additions and 6 deletions
+2
View File
@@ -307,6 +307,8 @@ rec {
home = rec { home = rec {
domain = "h.${pubDomain}"; domain = "h.${pubDomain}";
# Search domains advertised to clients (radvd DNSSL / kea domain-search)
searchDomains = [ domain "dyn.${domain}" colony.domain britway.domain ];
vlans = { vlans = {
hi = 100; hi = 100;
lo = 110; lo = 110;
+3 -3
View File
@@ -1,8 +1,8 @@
index: { lib, pkgs, config, assignments, allAssignments, ... }: index: { lib, pkgs, config, assignments, allAssignments, ... }:
let let
inherit (lib) mkForce; inherit (lib) mkForce concatStringsSep;
inherit (lib.my) net netbootKeaClientClasses; inherit (lib.my) net netbootKeaClientClasses;
inherit (lib.my.c.home) domain prefixes vips hiMTU; inherit (lib.my.c.home) domain searchDomains prefixes vips hiMTU;
dns-servers = [ dns-servers = [
{ {
@@ -59,7 +59,7 @@ in
} }
{ {
name = "domain-search"; name = "domain-search";
data = "${domain}, dyn.${domain}, ${lib.my.c.colony.domain}, ${lib.my.c.britway.domain}"; data = concatStringsSep ", " searchDomains;
always-send = true; always-send = true;
} }
]; ];
+3 -3
View File
@@ -1,8 +1,8 @@
index: { lib, pkgs, ... }: index: { lib, pkgs, ... }:
let let
inherit (lib) mkForce concatMapStringsSep; inherit (lib) mkForce concatMapStringsSep concatStringsSep;
inherit (lib.my) net; inherit (lib.my) net;
inherit (lib.my.c.home) domain prefixes vips; inherit (lib.my.c.home) domain searchDomains prefixes vips;
# untrusted uses external (Cloudflare) resolvers, matching the v4 kea config; # untrusted uses external (Cloudflare) resolvers, matching the v4 kea config;
# trusted VLANs use the internal recursor via its floating VRRP VIP # trusted VLANs use the internal recursor via its floating VRRP VIP
@@ -18,7 +18,7 @@ let
AdvLinkMTU ${toString prefixes."${name}".mtu}; AdvLinkMTU ${toString prefixes."${name}".mtu};
prefix ${prefixes."${name}".v6} {}; prefix ${prefixes."${name}".v6} {};
RDNSS ${rdnss name} {}; RDNSS ${rdnss name} {};
DNSSL ${domain} dyn.${domain} ${lib.my.c.colony.domain} ${lib.my.c.britway.domain} {}; DNSSL ${concatStringsSep " " searchDomains} {};
}; };
''; '';
in in