summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Strobel <ts468@cam.ac.uk>2016-02-29 01:47:12 +0100
committerThomas Strobel <ts468@cam.ac.uk>2016-02-29 01:47:12 +0100
commit2d6696fc0a23976498d0033d03382880e24e953d (patch)
tree8f95c3de3846a4082f5ab39674cfd1c110312e86
parentcad8957eabcbf73062226d28366fd446c15c8737 (diff)
downloadnixpkgs-2d6696fc0a23976498d0033d03382880e24e953d.tar
nixpkgs-2d6696fc0a23976498d0033d03382880e24e953d.tar.gz
nixpkgs-2d6696fc0a23976498d0033d03382880e24e953d.tar.bz2
nixpkgs-2d6696fc0a23976498d0033d03382880e24e953d.tar.lz
nixpkgs-2d6696fc0a23976498d0033d03382880e24e953d.tar.xz
nixpkgs-2d6696fc0a23976498d0033d03382880e24e953d.tar.zst
nixpkgs-2d6696fc0a23976498d0033d03382880e24e953d.zip
nixos-modules: Fixes related to "literalExample" and "defaultText".
-rw-r--r--nixos/modules/services/logging/logstash.nix6
-rw-r--r--nixos/modules/services/misc/octoprint.nix2
-rw-r--r--nixos/modules/services/networking/nsd.nix4
-rw-r--r--nixos/modules/services/networking/wpa_supplicant.nix9
4 files changed, 12 insertions, 9 deletions
diff --git a/nixos/modules/services/logging/logstash.nix b/nixos/modules/services/logging/logstash.nix
index d27456e59e8..e019e6c3f23 100644
--- a/nixos/modules/services/logging/logstash.nix
+++ b/nixos/modules/services/logging/logstash.nix
@@ -85,7 +85,7 @@ in
         type = types.lines;
         default = ''stdin { type => "example" }'';
         description = "Logstash input configuration.";
-        example = literalExample ''
+        example = ''
           # Read from journal
           pipe {
             command => "''${pkgs.systemd}/bin/journalctl -f -o json"
@@ -98,7 +98,7 @@ in
         type = types.lines;
         default = ''noop {}'';
         description = "logstash filter configuration.";
-        example = literalExample ''
+        example = ''
           if [type] == "syslog" {
             # Keep only relevant systemd fields
             # http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html
@@ -114,7 +114,7 @@ in
 
       outputConfig = mkOption {
         type = types.lines;
-        default = literalExample ''stdout { debug => true debug_format => "json"}'';
+        default = ''stdout { debug => true debug_format => "json"}'';
         description = "Logstash output configuration.";
         example = ''
           redis { host => "localhost" data_type => "list" key => "logstash" codec => json }
diff --git a/nixos/modules/services/misc/octoprint.nix b/nixos/modules/services/misc/octoprint.nix
index bb9dc5da2eb..150056b8ab0 100644
--- a/nixos/modules/services/misc/octoprint.nix
+++ b/nixos/modules/services/misc/octoprint.nix
@@ -62,7 +62,9 @@ in
       };
 
       plugins = mkOption {
+        type = types.functionTo (types.listOf types.package);
         default = plugins: [];
+        defaultText = "plugins: []";
         example = literalExample "plugins: [ m3d-fio ]";
         description = "Additional plugins.";
       };
diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix
index b3f2730e672..ca08bb57895 100644
--- a/nixos/modules/services/networking/nsd.nix
+++ b/nixos/modules/services/networking/nsd.nix
@@ -559,7 +559,7 @@ in
             algorithm = "hmac-md5";
             keyFile = "/path/to/my/key";
           };
-        };
+        }
       '';
       description = ''
         Define your TSIG keys here.
@@ -719,7 +719,7 @@ in
               ...
             ''';
           };
-        };
+        }
       '';
       description = ''
         Define your zones here. Zones can cascade other zones and therefore
diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix
index 88345fdc11e..a8f445a2c73 100644
--- a/nixos/modules/services/networking/wpa_supplicant.nix
+++ b/nixos/modules/services/networking/wpa_supplicant.nix
@@ -78,10 +78,11 @@ in {
         '';
         default = {};
         example = literalExample ''
-          echelon = {
-            psk = "abcdefgh";
-          };
-          "free.wifi" = {};
+          { echelon = {
+              psk = "abcdefgh";
+            };
+            "free.wifi" = {};
+          }
         '';
       };