2 Commits

Author SHA1 Message Date
  Astro 5d97e85bf6 nixos-module/container/dns: add ns.spaceboyz.net over dn42 to slaves 1 month ago
  Astro 73868f2f34 lib/dns: fix reverseZones4 to be complete 1 month ago
2 changed files with 14 additions and 10 deletions
  1. 13
    10
      nix/lib/dns.nix
  2. 1
    0
      nix/nixos-module/container/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`

+ 1
- 0
nix/nixos-module/container/dns.nix View File

@@ -98,6 +98,7 @@ in
98 98
               217.197.84.53;
99 99
               2001:67c:1400:2240::a;
100 100
               # ns.spaceboyz.net
101
+              172.22.24.4;
101 102
               95.217.229.209;
102 103
               2a01:4f9:4b:39ec::4;
103 104
             };

Loading…
Cancel
Save