git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/dovecot: make use of mkEnableOption
commit0efda5e2d01eb7ffa5e0b605cc68858e4d1a67ae authorajs124 <git@ajs124.de> dateThu 20 Jan 2022, 00:35 (5 years ago) parentc6683b4
1 file changed+10−39
nixos/modules/services/mail/dovecot.nix+10−39
nixos/modules/services/mail/dovecot.nix+10−39
@@ -169,25 +169,13 @@ in
169169 ];
170170
171171 options.services.dovecot2 = {
172− enable = mkEnableOption "Dovecot 2.x POP3/IMAP server";
172+ enable = mkEnableOption "the dovecot 2.x POP3/IMAP server";
173173
174− enablePop3 = mkOption {
175− type = types.bool;
176− default = false;
177− description = "Start the POP3 listener (when Dovecot is enabled).";
178− };
174+ enablePop3 = mkEnableOption "starting the POP3 listener (when Dovecot is enabled).";
179175
180− enableImap = mkOption {
181− type = types.bool;
182− default = true;
183− description = "Start the IMAP listener (when Dovecot is enabled).";
184− };
176+ enableImap = mkEnableOption "starting the IMAP listener (when Dovecot is enabled)." // { default = true; };
185177
186− enableLmtp = mkOption {
187− type = types.bool;
188− default = false;
189− description = "Start the LMTP listener (when Dovecot is enabled).";
190− };
178+ enableLmtp = mkEnableOption "starting the LMTP listener (when Dovecot is enabled).";
191179
192180 protocols = mkOption {
193181 type = types.listOf types.str;
@@ -279,13 +267,9 @@ in
279267 description = "Default group to store mail for virtual users.";
280268 };
281269
282− createMailUser = mkOption {
283− type = types.bool;
284− default = true;
285− description = ''Whether to automatically create the user
286− given in <option>services.dovecot.user</option> and the group
287− given in <option>services.dovecot.group</option>.'';
288− };
270+ createMailUser = mkEnableOption ''automatically creating the user
271+ given in <option>services.dovecot.user</option> and the group
272+ given in <option>services.dovecot.group</option>.'' // { default = true; };
289273
290274 modules = mkOption {
291275 type = types.listOf types.package;
@@ -316,11 +300,7 @@ in
316300 description = "Path to the server's private key.";
317301 };
318302
319− enablePAM = mkOption {
320− type = types.bool;
321− default = true;
322− description = "Whether to create a own Dovecot PAM service and configure PAM user logins.";
323− };
303+ enablePAM = mkEnableOption "creating a own Dovecot PAM service and configure PAM user logins." // { default = true; };
324304
325305 enableDHE = mkEnableOption "enable ssl_dh and generation of primes for the key exchange." // { default = true; };
326306
@@ -330,11 +310,7 @@ in
330310 description = "Sieve scripts to be executed. Key is a sequence, e.g. 'before2', 'after' etc.";
331311 };
332312
333− showPAMFailure = mkOption {
334− type = types.bool;
335− default = false;
336− description = "Show the PAM failure message on authentication error (useful for OTPW).";
337− };
313+ showPAMFailure = mkEnableOption "showing the PAM failure message on authentication error (useful for OTPW).";
338314
339315 mailboxes = mkOption {
340316 type = with types; coercedTo
@@ -350,12 +326,7 @@ in
350326 description = "Configure mailboxes and auto create or subscribe them.";
351327 };
352328
353− enableQuota = mkOption {
354− type = types.bool;
355− default = false;
356− example = true;
357− description = "Whether to enable the dovecot quota service.";
358− };
329+ enableQuota = mkEnableOption "the dovecot quota service.";
359330
360331 quotaPort = mkOption {
361332 type = types.str;