nsd service: make use of literalExample

This commit is contained in:
Christoph Hrdinka 2016-01-19 11:10:09 +01:00
parent 6a096504cc
commit c4c9019105

View File

@ -533,12 +533,13 @@ in
}; };
}); });
default = {}; default = {};
example = { example = literalExample ''
"tsig.example.org" = { { "tsig.example.org" = {
algorithm = "hmac-md5"; algorithm = "hmac-md5";
secret = "aaaaaabbbbbbccccccdddddd"; keyFile = "/path/to/my/key";
};
}; };
}; '';
description = '' description = ''
Define your TSIG keys here. Define your TSIG keys here.
''; '';
@ -668,34 +669,37 @@ in
zones = mkOption { zones = mkOption {
type = types.attrsOf zoneOptions; type = types.attrsOf zoneOptions;
default = {}; default = {};
example = { example = literalExample ''
"serverGroup1" = { { "serverGroup1" = {
provideXFR = [ "10.1.2.3 NOKEY" ]; provideXFR = [ "10.1.2.3 NOKEY" ];
children = { children = {
"example.com." = { "example.com." = {
data = '' data = '''
$ORIGIN example.com. $ORIGIN example.com.
$TTL 86400 $TTL 86400
@ IN SOA a.ns.example.com. admin.example.com. ( @ IN SOA a.ns.example.com. admin.example.com. (
... ...
''; ''';
}; };
"example.org." = { "example.org." = {
data = '' data = '''
$ORIGIN example.org. $ORIGIN example.org.
$TTL 86400 $TTL 86400
@ IN SOA a.ns.example.com. admin.example.com. ( @ IN SOA a.ns.example.com. admin.example.com. (
... ...
''; ''';
};
}; };
}; };
};
"example.net." = { "example.net." = {
provideXFR = [ "10.3.2.1 NOKEY" ]; provideXFR = [ "10.3.2.1 NOKEY" ];
data = ''...''; data = '''
...
''';
};
}; };
}; '';
description = '' description = ''
Define your zones here. Zones can cascade other zones and therefore Define your zones here. Zones can cascade other zones and therefore
inherit settings from parent zones. Look at the definition of inherit settings from parent zones. Look at the definition of