Browse Source

lib/dns: fix reverseZones4 to be complete

master
Astro 1 month ago
parent
commit
73868f2f34
1 changed files with 13 additions and 10 deletions
  1. 13
    10
      nix/lib/dns.nix

+ 13
- 10
nix/lib/dns.nix View File

@@ -10,6 +10,7 @@ rec {
10 10
   publicNS = [ "ns.c3d2.de" "ns.spaceboyz.net" ];
11 11
   
12 12
   dynamicReverseZones = [
13
+    "73.20.172.in-addr.arpa"
13 14
     "74.20.172.in-addr.arpa"
14 15
     "75.20.172.in-addr.arpa"
15 16
     "76.20.172.in-addr.arpa"
@@ -64,16 +65,18 @@ rec {
64 65
       ) {} (builtins.attrValues namedNets);
65 66
 
66 67
       # `[ "0.0.127.in-addr.arpa" ]`
67
-      reverseZones4 = builtins.attrNames (
68
-        builtins.foldl' (result: rname:
69
-          let
70
-            zone = builtins.head (
71
-              builtins.match "[[:digit:]]+\\.(.+)" rname
72
-            );
73
-          in result // {
74
-            "${zone}" = true;
75
-          }
76
-        ) {} (builtins.attrNames reverseHosts4)
68
+      reverseZones4 = lib.unique (
69
+        builtins.attrNames (
70
+          builtins.foldl' (result: rname:
71
+            let
72
+              zone = builtins.head (
73
+                builtins.match "[[:digit:]]+\\.(.+)" rname
74
+              );
75
+            in result // {
76
+              "${zone}" = true;
77
+            }
78
+          ) {} (builtins.attrNames reverseHosts4)
79
+        ) ++ dynamicReverseZones
77 80
       );
78 81
 
79 82
       # turns `::` into `0000:0000:0000:0000:0000:0000:0000:0000`

Loading…
Cancel
Save