ctucx.git: dns-nix

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

commit 36a558e3efd1ac20af0fb265a71e08b884de28d6
parent 27ccedfd1996a47bc89f7ba4e44889029796ca24
Author: Kirill Elagin <kirelagin@gmail.com>
Date: Fri, 8 Mar 2019 20:38:21 +0100

Add new line to zone earlier

This will make sure that you can call `toString` after `evalZone` and
then write the resulting string to file as is.
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dns/default.nix b/dns/default.nix
@@ -29,7 +29,7 @@ let
   writeZone = name: zone:
     pkgs.writeTextFile {
       name = "${name}.zone";
-      text = toString (evalZone name zone) + "\n";
+      text = toString (evalZone name zone);
     };
 in
 
diff --git a/dns/types/zone.nix b/dns/types/zone.nix
@@ -52,6 +52,6 @@ types.submodule ({name, ...}: {
 
           ${toString SOA}
 
-        '' + concatStringsSep "\n\n" groups';
+        '' + concatStringsSep "\n\n" groups' + "\n";
   };
 })