mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-28 14:50:55 +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 ];
|
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 = {
|
defaults = {
|
||||||
inherit SOA NS;
|
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
|
in
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -52,7 +62,9 @@ with lib;
|
||||||
let
|
let
|
||||||
subdomain = lib.dns.getDomainPrefix allowedDomains n;
|
subdomain = lib.dns.getDomainPrefix allowedDomains n;
|
||||||
in
|
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))
|
) (lib.dns.domainToRecords domain cfg (isVPNDomain domain))
|
||||||
) domains;
|
) domains;
|
||||||
|
|
Loading…
Add table
Reference in a new issue