git.iko.soy/typeable/nixpkgs
on master help sign in
nixos-modules: Fixes related to "literalExample" and "defaultText".
commit2d6696fc0a23976498d0033d03382880e24e953d authorThomas Strobel <ts468@cam.ac.uk> dateMon 29 Feb 2016, 01:47 (11 years ago) parentcad8957
4 files changed+12−9
nixos/modules/services/logging/logstash.nix+3−3 nixos/modules/services/misc/octoprint.nix+2 nixos/modules/services/networking/nsd.nix+2−2 nixos/modules/services/networking/wpa_supplicant.nix+5−4
nixos/modules/services/logging/logstash.nix+3−3
@@ -85,7 +85,7 @@ in
8585 type = types.lines;
8686 default = ''stdin { type => "example" }'';
8787 description = "Logstash input configuration.";
88− example = literalExample ''
88+ example = ''
8989 # Read from journal
9090 pipe {
9191 command => "''${pkgs.systemd}/bin/journalctl -f -o json"
@@ -98,7 +98,7 @@ in
9898 type = types.lines;
9999 default = ''noop {}'';
100100 description = "logstash filter configuration.";
101− example = literalExample ''
101+ example = ''
102102 if [type] == "syslog" {
103103 # Keep only relevant systemd fields
104104 # http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html
@@ -114,7 +114,7 @@ in
114114
115115 outputConfig = mkOption {
116116 type = types.lines;
117− default = literalExample ''stdout { debug => true debug_format => "json"}'';
117+ default = ''stdout { debug => true debug_format => "json"}'';
118118 description = "Logstash output configuration.";
119119 example = ''
120120 redis { host => "localhost" data_type => "list" key => "logstash" codec => json }
nixos/modules/services/misc/octoprint.nix+2
@@ -62,7 +62,9 @@ in
6262 };
6363
6464 plugins = mkOption {
65+ type = types.functionTo (types.listOf types.package);
6566 default = plugins: [];
67+ defaultText = "plugins: []";
6668 example = literalExample "plugins: [ m3d-fio ]";
6769 description = "Additional plugins.";
6870 };
nixos/modules/services/networking/nsd.nix+2−2
@@ -559,7 +559,7 @@ in
559559 algorithm = "hmac-md5";
560560 keyFile = "/path/to/my/key";
561561 };
562− };
562+ }
563563 '';
564564 description = ''
565565 Define your TSIG keys here.
@@ -719,7 +719,7 @@ in
719719 ...
720720 ''';
721721 };
722− };
722+ }
723723 '';
724724 description = ''
725725 Define your zones here. Zones can cascade other zones and therefore
nixos/modules/services/networking/wpa_supplicant.nix+5−4
@@ -78,10 +78,11 @@ in {
7878 '';
7979 default = {};
8080 example = literalExample ''
81− echelon = {
82− psk = "abcdefgh";
83− };
84− "free.wifi" = {};
81+ { echelon = {
82+ psk = "abcdefgh";
83+ };
84+ "free.wifi" = {};
85+ }
8586 '';
8687 };
8788