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:
@@ -1,8 +1,8 @@
|
||||
index: { lib, pkgs, config, assignments, allAssignments, ... }:
|
||||
let
|
||||
inherit (lib) mkForce;
|
||||
inherit (lib) mkForce concatStringsSep;
|
||||
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 = [
|
||||
{
|
||||
@@ -59,7 +59,7 @@ in
|
||||
}
|
||||
{
|
||||
name = "domain-search";
|
||||
data = "${domain}, dyn.${domain}, ${lib.my.c.colony.domain}, ${lib.my.c.britway.domain}";
|
||||
data = concatStringsSep ", " searchDomains;
|
||||
always-send = true;
|
||||
}
|
||||
];
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
index: { lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib) mkForce concatMapStringsSep;
|
||||
inherit (lib) mkForce concatMapStringsSep concatStringsSep;
|
||||
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;
|
||||
# trusted VLANs use the internal recursor via its floating VRRP VIP
|
||||
@@ -18,7 +18,7 @@ let
|
||||
AdvLinkMTU ${toString prefixes."${name}".mtu};
|
||||
prefix ${prefixes."${name}".v6} {};
|
||||
RDNSS ${rdnss name} {};
|
||||
DNSSL ${domain} dyn.${domain} ${lib.my.c.colony.domain} ${lib.my.c.britway.domain} {};
|
||||
DNSSL ${concatStringsSep " " searchDomains} {};
|
||||
};
|
||||
'';
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user