summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorLeroy Hopson <git@leroy.geek.nz>2015-07-04 18:50:27 +1200
committerLeroy Hopson <git@leroy.geek.nz>2016-02-27 22:25:39 +1300
commitf6f892e2d64445b7eeab56bec9715ba0ffbae10d (patch)
tree2cf48e56631b18e3c5346440d390b65ea6a8ce45 /nixos/modules
parent24d5d28820d3d85a393dea61bb362ca0e6a2c849 (diff)
downloadnixlib-f6f892e2d64445b7eeab56bec9715ba0ffbae10d.tar
nixlib-f6f892e2d64445b7eeab56bec9715ba0ffbae10d.tar.gz
nixlib-f6f892e2d64445b7eeab56bec9715ba0ffbae10d.tar.bz2
nixlib-f6f892e2d64445b7eeab56bec9715ba0ffbae10d.tar.lz
nixlib-f6f892e2d64445b7eeab56bec9715ba0ffbae10d.tar.xz
nixlib-f6f892e2d64445b7eeab56bec9715ba0ffbae10d.tar.zst
nixlib-f6f892e2d64445b7eeab56bec9715ba0ffbae10d.zip
nsd service: fix formatting of example
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/networking/nsd.nix53
1 files changed, 28 insertions, 25 deletions
diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix
index e85f26811257..10566310041e 100644
--- a/nixos/modules/services/networking/nsd.nix
+++ b/nixos/modules/services/networking/nsd.nix
@@ -621,34 +621,37 @@ in
       zones = mkOption {
         type        = types.attrsOf zoneOptions;
         default     = {};
-        example     = {
-          "serverGroup1" = {
-            provideXFR = [ "10.1.2.3 NOKEY" ];
-            children = {
-              "example.com." = {
-                data = ''
-                  $ORIGIN example.com.
-                  $TTL    86400
-                  @ IN SOA a.ns.example.com. admin.example.com. (
-                  ...
-                '';
-              };
-              "example.org." = {
-                data = ''
-                  $ORIGIN example.org.
-                  $TTL    86400
-                  @ IN SOA a.ns.example.com. admin.example.com. (
-                  ...
-                '';
+        example     = literalExample ''
+          { "serverGroup1" = {
+              provideXFR = [ "10.1.2.3 NOKEY" ];
+              children = {
+                "example.com." = {
+                  data = '''
+                    $ORIGIN example.com.
+                    $TTL    86400
+                    @ IN SOA a.ns.example.com. admin.example.com. (
+                    ...
+                  ''';
+                };
+                "example.org." = {
+                  data = '''
+                    $ORIGIN example.org.
+                    $TTL    86400
+                    @ IN SOA a.ns.example.com. admin.example.com. (
+                    ...
+                  ''';
+                };
               };
             };
-          };
 
-          "example.net." = {
-            provideXFR = [ "10.3.2.1 NOKEY" ];
-            data = ''...'';
-          };
-        };
+            "example.net." = {
+              provideXFR = [ "10.3.2.1 NOKEY" ];
+              data = '''
+                ...
+              ''';
+            };
+          }
+        '';
         description = ''
           Define your zones here. Zones can cascade other zones and therefore
           inherit settings from parent zones. Look at the definition of