1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

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 = {};
example = {
"tsig.example.org" = {
algorithm = "hmac-md5";
secret = "aaaaaabbbbbbccccccdddddd";
example = literalExample ''
{ "tsig.example.org" = {
algorithm = "hmac-md5";
keyFile = "/path/to/my/key";
};
};
};
'';
description = ''
Define your TSIG keys here.
'';
@ -668,34 +669,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