git.iko.soy/typeable/nixpkgs
on master help sign in
nsd service: make use of literalExample
commitc4c9019105f790252a3b996c6dad4c33393e7977 authorChristoph Hrdinka <c.github@hrdinka.at> dateTue 19 Jan 2016, 11:10 (11 years ago) parent6a09650
1 file changed+33−29
nixos/modules/services/networking/nsd.nix+33−29
nixos/modules/services/networking/nsd.nix+33−29
@@ -533,12 +533,13 @@ in
533533 };
534534 });
535535 default = {};
536− example = {
537− "tsig.example.org" = {
538− algorithm = "hmac-md5";
539− secret = "aaaaaabbbbbbccccccdddddd";
536+ example = literalExample ''
537+ { "tsig.example.org" = {
538+ algorithm = "hmac-md5";
539+ keyFile = "/path/to/my/key";
540+ };
540541 };
541− };
542+ '';
542543 description = ''
543544 Define your TSIG keys here.
544545 '';
@@ -668,34 +669,37 @@ in
668669 zones = mkOption {
669670 type = types.attrsOf zoneOptions;
670671 default = {};
671− example = {
672− "serverGroup1" = {
673− provideXFR = [ "10.1.2.3 NOKEY" ];
674− children = {
675− "example.com." = {
676− data = ''
677− $ORIGIN example.com.
678− $TTL 86400
679− @ IN SOA a.ns.example.com. admin.example.com. (
680− ...
681− '';
682− };
683− "example.org." = {
684− data = ''
685− $ORIGIN example.org.
686− $TTL 86400
687− @ IN SOA a.ns.example.com. admin.example.com. (
688− ...
689− '';
672+ example = literalExample ''
673+ { "serverGroup1" = {
674+ provideXFR = [ "10.1.2.3 NOKEY" ];
675+ children = {
676+ "example.com." = {
677+ data = '''
678+ $ORIGIN example.com.
679+ $TTL 86400
680+ @ IN SOA a.ns.example.com. admin.example.com. (
681+ ...
682+ ''';
683+ };
684+ "example.org." = {
685+ data = '''
686+ $ORIGIN example.org.
687+ $TTL 86400
688+ @ IN SOA a.ns.example.com. admin.example.com. (
689+ ...
690+ ''';
691+ };
690692 };
691693 };
692− };
693694
694− "example.net." = {
695− provideXFR = [ "10.3.2.1 NOKEY" ];
696− data = ''...'';
695+ "example.net." = {
696+ provideXFR = [ "10.3.2.1 NOKEY" ];
697+ data = '''
698+ ...
699+ ''';
700+ };
697701 };
698− };
702+ '';
699703 description = ''
700704 Define your zones here. Zones can cascade other zones and therefore
701705 inherit settings from parent zones. Look at the definition of