Add missing 'type', 'defaultText' and 'literalExample' in module definitions
- add missing types in module definitions - add missing 'defaultText' in module definitions - wrap example with 'literalExample' where necessary in module definitions
···57 users.ldap = {
5859 enable = mkOption {
060 default = false;
61 description = "Whether to enable authentication against an LDAP server.";
62 };
···57 users.ldap = {
5859 enable = mkOption {
60+ type = types.bool;
61 default = false;
62 description = "Whether to enable authentication against an LDAP server.";
63 };
+1
nixos/modules/config/pulseaudio.nix
···99 package = mkOption {
100 type = types.package;
101 default = pulseaudioLight;
0102 example = literalExample "pkgs.pulseaudioFull";
103 description = ''
104 The PulseAudio derivation to use. This can be used to enable
···99 package = mkOption {
100 type = types.package;
101 default = pulseaudioLight;
102+ defaultText = "pkgs.pulseaudioLight";
103 example = literalExample "pkgs.pulseaudioFull";
104 description = ''
105 The PulseAudio derivation to use. This can be used to enable
···1011 options = {
12 environment.unixODBCDrivers = mkOption {
013 default = [];
14- example = literalExample "map (x : x.ini) (with pkgs.unixODBCDrivers; [ mysql psql psqlng ] )";
15 description = ''
16 Specifies Unix ODBC drivers to be registered in
17 <filename>/etc/odbcinst.ini</filename>. You may also want to
···26 config = mkIf (config.environment.unixODBCDrivers != []) {
2728 environment.etc."odbcinst.ini".text =
29- let inis = config.environment.unixODBCDrivers;
30 in lib.concatStringsSep "\n" inis;
3132 };
···1011 options = {
12 environment.unixODBCDrivers = mkOption {
13+ type = types.listOf types.package;
14 default = [];
15+ example = literalExample "with pkgs.unixODBCDrivers; [ mysql psql psqlng ]";
16 description = ''
17 Specifies Unix ODBC drivers to be registered in
18 <filename>/etc/odbcinst.ini</filename>. You may also want to
···27 config = mkIf (config.environment.unixODBCDrivers != []) {
2829 environment.etc."odbcinst.ini".text =
30+ let inis = map (x : x.ini) config.environment.unixODBCDrivers;
31 in lib.concatStringsSep "\n" inis;
3233 };
+1
nixos/modules/misc/crashdump.nix
···24 '';
25 };
26 kernelPackages = mkOption {
027 default = pkgs.linuxPackages;
28 # We don't want to evaluate all of linuxPackages for the manual
29 # - some of it might not even evaluate correctly.
···24 '';
25 };
26 kernelPackages = mkOption {
27+ type = types.package;
28 default = pkgs.linuxPackages;
29 # We don't want to evaluate all of linuxPackages for the manual
30 # - some of it might not even evaluate correctly.
+2-2
nixos/modules/misc/nixos.nix
···3738 nixos.extraModules = mkOption {
39 default = [];
40- example = literalExample "mkIf config.services.openssh.enable [ ./sshd-config.nix ]";
41- type = types.listOf types.unspecified;
42 description = ''
43 Define additional modules which would be loaded to evaluate the
44 configuration.
···3738 nixos.extraModules = mkOption {
39 default = [];
40+ example = literalExample "[ ./sshd-config.nix ]";
41+ type = types.listOf (types.either (types.submodule ({...}:{options={};})) types.path);
42 description = ''
43 Define additional modules which would be loaded to evaluate the
44 configuration.
+14-10
nixos/modules/programs/ssh.nix
···93 };
9495 package = mkOption {
096 default = pkgs.openssh;
097 description = ''
98 The package used for the openssh client and daemon.
99 '';
···142 description = ''
143 The set of system-wide known SSH hosts.
144 '';
145- example = [
146- {
147- hostNames = [ "myhost" "myhost.mydomain.com" "10.10.1.4" ];
148- publicKeyFile = literalExample "./pubkeys/myhost_ssh_host_dsa_key.pub";
149- }
150- {
151- hostNames = [ "myhost2" ];
152- publicKeyFile = literalExample "./pubkeys/myhost2_ssh_host_dsa_key.pub";
153- }
154- ];
00155 };
156157 };
···93 };
9495 package = mkOption {
96+ type = types.package;
97 default = pkgs.openssh;
98+ defaultText = "pkgs.openssh";
99 description = ''
100 The package used for the openssh client and daemon.
101 '';
···144 description = ''
145 The set of system-wide known SSH hosts.
146 '';
147+ example = literalExample ''
148+ [
149+ {
150+ hostNames = [ "myhost" "myhost.mydomain.com" "10.10.1.4" ];
151+ publicKeyFile = "./pubkeys/myhost_ssh_host_dsa_key.pub";
152+ }
153+ {
154+ hostNames = [ "myhost2" ];
155+ publicKeyFile = "./pubkeys/myhost2_ssh_host_dsa_key.pub";
156+ }
157+ ]
158+ '';
159 };
160161 };
···207 description = ''
208 Extra configuration to be passed in Client directive.
209 '';
210- example = literalExample ''
211 Maximum Concurrent Jobs = 20;
212 Heartbeat Interval = 30;
213 '';
···218 description = ''
219 Extra configuration to be passed in Messages directive.
220 '';
221- example = literalExample ''
222 console = all
223 '';
224 };
···207 description = ''
208 Extra configuration to be passed in Client directive.
209 '';
210+ example = ''
211 Maximum Concurrent Jobs = 20;
212 Heartbeat Interval = 30;
213 '';
···218 description = ''
219 Extra configuration to be passed in Messages directive.
220 '';
221+ example = ''
222 console = all
223 '';
224 };
+1
nixos/modules/services/backup/rsnapshot.nix
···43 package = mkOption {
44 type = types.package;
45 default = pkgs.rsnapshot;
046 example = literalExample "pkgs.rsnapshotGit";
47 description = ''
48 RSnapshot package to use.
···90 package = mkOption {
91 type = types.package;
92 default = pkgs.dovecot22;
093 description = "Dovecot package to use.";
94 };
95···131 modules = mkOption {
132 type = types.listOf types.package;
133 default = [];
134- example = [ pkgs.dovecot_pigeonhole ];
135 description = ''
136 Symlinks the contents of lib/dovecot of every given package into
137 /var/lib/dovecot/modules. This will make the given modules available
···90 package = mkOption {
91 type = types.package;
92 default = pkgs.dovecot22;
93+ defaultText = "pkgs.dovecot22";
94 description = "Dovecot package to use.";
95 };
96···132 modules = mkOption {
133 type = types.listOf types.package;
134 default = [];
135+ example = literalExample "[ pkgs.dovecot_pigeonhole ]";
136 description = ''
137 Symlinks the contents of lib/dovecot of every given package into
138 /var/lib/dovecot/modules. This will make the given modules available
+1-2
nixos/modules/services/misc/apache-kafka.nix
···118119 package = mkOption {
120 description = "The kafka package to use";
121-122 default = pkgs.apacheKafka;
123-124 type = types.package;
125 };
126
···118119 package = mkOption {
120 description = "The kafka package to use";
0121 default = pkgs.apacheKafka;
122+ defaultText = "pkgs.apacheKafka";
123 type = types.package;
124 };
125
···17 };
1819 package = mkOption {
020 default = pkgs.mbpfan;
021 description = ''
22 The package used for the mbpfan daemon.
23 '';
···17 };
1819 package = mkOption {
20+ type = types.package;
21 default = pkgs.mbpfan;
22+ defaultText = "pkgs.mbpfan";
23 description = ''
24 The package used for the mbpfan daemon.
25 '';
+1
nixos/modules/services/misc/nix-daemon.nix
···66 package = mkOption {
67 type = types.package;
68 default = pkgs.nix;
069 description = ''
70 This option specifies the Nix package instance to use throughout the system.
71 '';
···66 package = mkOption {
67 type = types.package;
68 default = pkgs.nix;
69+ defaultText = "pkgs.nix";
70 description = ''
71 This option specifies the Nix package instance to use throughout the system.
72 '';
···108 finders = mkOption {
109 description = "List of finder plugins to load.";
110 default = [];
111- example = [ pkgs.python27Packages.graphite_influxdb ];
112 type = types.listOf types.package;
113 };
114···136 package = mkOption {
137 description = "Package to use for graphite api.";
138 default = pkgs.python27Packages.graphite_api;
0139 type = types.package;
140 };
141···146 directories:
147 - ${dataDir}/whisper
148 '';
149- example = literalExample ''
150 allowed_origins:
151 - dashboard.example.com
152 cheat_times: true
···350 critical: 200
351 name: Test
352 '';
353- example = literalExample ''
354 pushbullet_key: pushbullet_api_key
355 alerts:
356 - target: stats.seatgeek.app.deal_quality.venue_info_cache.hit
···108 finders = mkOption {
109 description = "List of finder plugins to load.";
110 default = [];
111+ example = literalExample "[ pkgs.python27Packages.graphite_influxdb ]";
112 type = types.listOf types.package;
113 };
114···136 package = mkOption {
137 description = "Package to use for graphite api.";
138 default = pkgs.python27Packages.graphite_api;
139+ defaultText = "pkgs.python27Packages.graphite_api";
140 type = types.package;
141 };
142···147 directories:
148 - ${dataDir}/whisper
149 '';
150+ example = ''
151 allowed_origins:
152 - dashboard.example.com
153 cheat_times: true
···351 critical: 200
352 name: Test
353 '';
354+ example = ''
355 pushbullet_key: pushbullet_api_key
356 alerts:
357 - target: stats.seatgeek.app.deal_quality.venue_info_cache.hit
+1
nixos/modules/services/monitoring/heapster.nix
···33 package = mkOption {
34 description = "Package to use by heapster";
35 default = pkgs.heapster;
036 type = types.package;
37 };
38 };
···33 package = mkOption {
34 description = "Package to use by heapster";
35 default = pkgs.heapster;
36+ defaultText = "pkgs.heapster";
37 type = types.package;
38 };
39 };
+3-15
nixos/modules/services/monitoring/munin.nix
···122 HTML output is in <filename>/var/www/munin/</filename>, configure your
123 favourite webserver to serve static files.
124 '';
125- example = literalExample ''
126- services = {
127- munin-node.enable = true;
128- munin-cron = {
129- enable = true;
130- hosts = '''
131- [''${config.networking.hostName}]
132- address localhost
133- ''';
134- extraGlobalConfig = '''
135- contact.email.command mail -s "Munin notification for ''${var:host}" someone@example.com
136- ''';
137- };
138- };
139- '';
140 };
141142 extraGlobalConfig = mkOption {
···146 See <link xlink:href='http://munin-monitoring.org/wiki/munin.conf' />.
147 Useful to setup notifications, see
148 <link xlink:href='http://munin-monitoring.org/wiki/HowToContact' />
000149 '';
150 };
151
···122 HTML output is in <filename>/var/www/munin/</filename>, configure your
123 favourite webserver to serve static files.
124 '';
000000000000000125 };
126127 extraGlobalConfig = mkOption {
···131 See <link xlink:href='http://munin-monitoring.org/wiki/munin.conf' />.
132 Useful to setup notifications, see
133 <link xlink:href='http://munin-monitoring.org/wiki/HowToContact' />
134+ '';
135+ example = ''
136+ contact.email.command mail -s "Munin notification for ''${var:host}" someone@example.com
137 '';
138 };
139
+6
nixos/modules/services/monitoring/nagios.nix
···94 };
9596 plugins = mkOption {
097 default = [pkgs.nagiosPluginsOfficial pkgs.ssmtp];
098 description = "
99 Packages to be added to the Nagios <envar>PATH</envar>.
100 Typically used to add plugins, but can be anything.
···102 };
103104 mainConfigFile = mkOption {
0105 default = nagiosCfgFile;
0106 description = "
107 Derivation for the main configuration file of Nagios.
108 ";
109 };
110111 cgiConfigFile = mkOption {
0112 default = nagiosCGICfgFile;
0113 description = "
114 Derivation for the configuration file of Nagios CGI scripts
115 that can be used in web servers for running the Nagios web interface.
···94 };
9596 plugins = mkOption {
97+ type = types.listOf types.package;
98 default = [pkgs.nagiosPluginsOfficial pkgs.ssmtp];
99+ defaultText = "[pkgs.nagiosPluginsOfficial pkgs.ssmtp]";
100 description = "
101 Packages to be added to the Nagios <envar>PATH</envar>.
102 Typically used to add plugins, but can be anything.
···104 };
105106 mainConfigFile = mkOption {
107+ type = types.package;
108 default = nagiosCfgFile;
109+ defaultText = "nagiosCfgFile";
110 description = "
111 Derivation for the main configuration file of Nagios.
112 ";
113 };
114115 cgiConfigFile = mkOption {
116+ type = types.package;
117 default = nagiosCGICfgFile;
118+ defaultText = "nagiosCGICfgFile";
119 description = "
120 Derivation for the configuration file of Nagios CGI scripts
121 that can be used in web servers for running the Nagios web interface.
+2-1
nixos/modules/services/monitoring/scollector.nix
···43 package = mkOption {
44 type = types.package;
45 default = pkgs.scollector;
046 example = literalExample "pkgs.scollector";
47 description = ''
48 scollector binary to use.
···77 collectors = mkOption {
78 type = with types; attrsOf (listOf path);
79 default = {};
80- example = literalExample "{ 0 = [ \"\${postgresStats}/bin/collect-stats\" ]; }";
81 description = ''
82 An attribute set mapping the frequency of collection to a list of
83 binaries that should be executed at that frequency. You can use "0"
···43 package = mkOption {
44 type = types.package;
45 default = pkgs.scollector;
46+ defaultText = "pkgs.scollector";
47 example = literalExample "pkgs.scollector";
48 description = ''
49 scollector binary to use.
···78 collectors = mkOption {
79 type = with types; attrsOf (listOf path);
80 default = {};
81+ example = literalExample "{ \"0\" = [ \"\${postgresStats}/bin/collect-stats\" ]; }";
82 description = ''
83 An attribute set mapping the frequency of collection to a list of
84 binaries that should be executed at that frequency. You can use "0"
···85 package = mkOption {
86 type = types.package;
87 default = pkgs.samba;
88- example = pkgs.samba4;
089 description = ''
90 Defines which package should be used for the samba server.
91 '';
···85 package = mkOption {
86 type = types.package;
87 default = pkgs.samba;
88+ defaultText = "pkgs.samba";
89+ example = literalExample "pkgs.samba4";
90 description = ''
91 Defines which package should be used for the samba server.
92 '';
+2
nixos/modules/services/networking/bind.nix
···120 };
121122 configFile = mkOption {
0123 default = confFile;
0124 description = "
125 Overridable config file to use for named. By default, that
126 generated by nixos.
···120 };
121122 configFile = mkOption {
123+ type = types.path;
124 default = confFile;
125+ defaultText = "confFile";
126 description = "
127 Overridable config file to use for named. By default, that
128 generated by nixos.
+1
nixos/modules/services/networking/consul.nix
···118 package = mkOption {
119 description = "Package to use for consul-alerts.";
120 default = pkgs.consul-alerts;
0121 type = types.package;
122 };
123
···118 package = mkOption {
119 description = "Package to use for consul-alerts.";
120 default = pkgs.consul-alerts;
121+ defaultText = "pkgs.consul-alerts";
122 type = types.package;
123 };
124
+2-1
nixos/modules/services/networking/firewall.nix
···421 };
422423 networking.firewall.extraPackages = mkOption {
0424 default = [ ];
425- example = [ pkgs.ipset ];
426 description =
427 ''
428 Additional packages to be included in the environment of the system
···421 };
422423 networking.firewall.extraPackages = mkOption {
424+ type = types.listOf types.package;
425 default = [ ];
426+ example = literalExample "[ pkgs.ipset ]";
427 description =
428 ''
429 Additional packages to be included in the environment of the system
···87 };
8889 package = mkOption {
090 default = pkgs.tinc_pre;
091 description = ''
92 The package to use for the tinc daemon's binary.
93 '';
···87 };
8889 package = mkOption {
90+ type = types.package;
91 default = pkgs.tinc_pre;
92+ defaultText = "pkgs.tinc_pre";
93 description = ''
94 The package to use for the tinc daemon's binary.
95 '';
+2
nixos/modules/services/networking/vsftpd.nix
···120 };
121122 userlistFile = mkOption {
0123 default = pkgs.writeText "userlist" (concatMapStrings (x: "${x}\n") cfg.userlist);
0124 description = ''
125 Newline separated list of names to be allowed/denied if <option>userlistEnable</option>
126 is <literal>true</literal>. Meaning see <option>userlistDeny</option>.
···120 };
121122 userlistFile = mkOption {
123+ type = types.path;
124 default = pkgs.writeText "userlist" (concatMapStrings (x: "${x}\n") cfg.userlist);
125+ defaultText = "pkgs.writeText \"userlist\" (concatMapStrings (x: \"\${x}\n\") cfg.userlist)";
126 description = ''
127 Newline separated list of names to be allowed/denied if <option>userlistEnable</option>
128 is <literal>true</literal>. Meaning see <option>userlistDeny</option>.
···67 theme = {
6869 package = mkOption {
70- type = types.path;
71 default = pkgs.gnome3.gnome_themes_standard;
072 description = ''
73 The package path that contains the theme given in the name option.
74 '';
···87 iconTheme = {
8889 package = mkOption {
90- type = types.path;
91 default = pkgs.gnome3.defaultIconTheme;
092 description = ''
93 The package path that contains the icon theme given in the name option.
94 '';
···67 theme = {
6869 package = mkOption {
70+ type = types.package;
71 default = pkgs.gnome3.gnome_themes_standard;
72+ defaultText = "pkgs.gnome3.gnome_themes_standard";
73 description = ''
74 The package path that contains the theme given in the name option.
75 '';
···88 iconTheme = {
8990 package = mkOption {
91+ type = types.package;
92 default = pkgs.gnome3.defaultIconTheme;
93+ defaultText = "pkgs.gnome3.defaultIconTheme";
94 description = ''
95 The package path that contains the icon theme given in the name option.
96 '';
···6970 greeter = {
71 package = mkOption {
72- type = types.path;
73 description = ''
74 The LightDM greeter to login via. The package should be a directory
75 containing a .desktop file matching the name in the 'name' option.
···86 };
8788 background = mkOption {
089 description = ''
90 The background image or color to use.
91 '';
···6970 greeter = {
71 package = mkOption {
72+ type = types.package;
73 description = ''
74 The LightDM greeter to login via. The package should be a directory
75 containing a .desktop file matching the name in the 'name' option.
···86 };
8788 background = mkOption {
89+ type = types.path;
90 description = ''
91 The background image or color to use.
92 '';
···20 options = {
2122 boot.kernelPackages = mkOption {
023 default = pkgs.linuxPackages;
24 # We don't want to evaluate all of linuxPackages for the manual
25 # - some of it might not even evaluate correctly.
···63 };
6465 boot.extraModulePackages = mkOption {
66- type = types.listOf types.path;
67 default = [];
68 example = literalExample "[ pkgs.linuxPackages.nvidia_x11 ]";
69 description = "A list of additional packages supplying kernel modules.";
···20 options = {
2122 boot.kernelPackages = mkOption {
23+ type = types.packageSet;
24 default = pkgs.linuxPackages;
25 # We don't want to evaluate all of linuxPackages for the manual
26 # - some of it might not even evaluate correctly.
···64 };
6566 boot.extraModulePackages = mkOption {
67+ type = types.listOf types.package;
68 default = [];
69 example = literalExample "[ pkgs.linuxPackages.nvidia_x11 ]";
70 description = "A list of additional packages supplying kernel modules.";
···229230 boot.initrd.luks.devices = mkOption {
231 default = [ ];
232- example = [ { name = "luksroot"; device = "/dev/sda3"; preLVM = true; } ];
233 description = ''
234 The list of devices that should be decrypted using LUKS before trying to mount the
235 root partition. This works for both LVM-over-LUKS and LUKS-over-LVM setups.
···229230 boot.initrd.luks.devices = mkOption {
231 default = [ ];
232+ example = literalExample ''[ { name = "luksroot"; device = "/dev/sda3"; preLVM = true; } ]'';
233 description = ''
234 The list of devices that should be decrypted using LUKS before trying to mount the
235 root partition. This works for both LVM-over-LUKS and LUKS-over-LVM setups.