ctucx.git: dns.nix

fork of https://github.com/kirelagin/dns.nix

commit 262c366c0f277d447731ffb5d5d6b2531bd49f36
parent 3e88c8e8c06d23b4f28da26a73a78b8ff8ca1b3b
Author: Kirill Elagin <kirelagin@gmail.com>
Date: Fri, 8 Mar 2019 19:54:01 +0100

Add missing root dots
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dns/types/records/CNAME.nix b/dns/types/records/CNAME.nix
@@ -20,5 +20,5 @@ in
       description = "A <domain-name> which specifies the canonical or primary name for the owner. The owner name is an alias";
     };
   };
-  dataToString = {cname, ...}: cname;
+  dataToString = {cname, ...}: "${cname}.";
 }
diff --git a/dns/types/records/NS.nix b/dns/types/records/NS.nix
@@ -20,5 +20,5 @@ in
       description = "A <domain-name> which specifies a host which should be authoritative for the specified class and domain";
     };
   };
-  dataToString = {nsdname, ...}: nsdname;
+  dataToString = {nsdname, ...}: "${nsdname}.";
 }
diff --git a/dns/types/records/SOA.nix b/dns/types/records/SOA.nix
@@ -59,5 +59,5 @@ in
   dataToString = data@{nameServer, adminEmail, ...}:
     let
       numbers = map toString (with data; [serial refresh retry expire minimum]);
-    in "${nameServer} ${adminEmail} (${concatStringsSep " " numbers})";
+    in "${nameServer}. ${adminEmail}. (${concatStringsSep " " numbers})";
 }