mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-25 21:30:52 +01:00
chore: add ns A/AAAA records to all zones
This commit is contained in:
parent
02714b8a74
commit
de7dd4c370
2 changed files with 13 additions and 11 deletions
|
@ -100,16 +100,6 @@ lib.mkMerge [
|
|||
'';
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 53 ];
|
||||
machine.meta.zones."julienmalka.me".subdomains = {
|
||||
ns1 = {
|
||||
A = [ "82.67.34.230" ];
|
||||
AAAA = [ "2a01:e0a:de4:a0e0:2f0:cbff:feef:e12a" ];
|
||||
};
|
||||
ns2 = {
|
||||
A = [ "163.172.91.82" ];
|
||||
AAAA = [ "2001:bc8:3d24::45" ];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,16 @@ let
|
|||
];
|
||||
defaults = {
|
||||
inherit SOA NS;
|
||||
subdomains = {
|
||||
ns1 = {
|
||||
A = [ lib.snowfield.router.ips.public.ipv4 ];
|
||||
AAAA = [ lib.snowfield.router.ips.public.ipv6 ];
|
||||
};
|
||||
ns2 = {
|
||||
A = [ lib.snowfield.akhaten.ips.public.ipv4 ];
|
||||
AAAA = [ lib.snowfield.akhaten.ips.public.ipv6 ];
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
with lib;
|
||||
|
@ -52,7 +62,9 @@ with lib;
|
|||
let
|
||||
subdomain = lib.dns.getDomainPrefix allowedDomains n;
|
||||
in
|
||||
(if elem subdomain allowedDomains then v else { subdomains."${subdomain}" = v; }) // defaults
|
||||
lib.recursiveUpdate (
|
||||
if elem subdomain allowedDomains then v else { subdomains."${subdomain}" = v; }
|
||||
) defaults
|
||||
)
|
||||
) (lib.dns.domainToRecords domain cfg (isVPNDomain domain))
|
||||
) domains;
|
||||
|
|
Loading…
Add table
Reference in a new issue