From aea389e00d4d8a106369d24a7eba0eb519745ff0 Mon Sep 17 00:00:00 2001 From: Katalin Rebhan Date: Mon, 13 Apr 2026 21:37:29 +0200 Subject: [PATCH] nixos/dovecot: define options for config and storage version dovecot_config_version and dovecot_storage_version are accessed by the module, so should at least have a default set so that assertions eval correctly. --- nixos/modules/services/mail/dovecot.nix | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix index a9dd9531fadf..70971db69a97 100644 --- a/nixos/modules/services/mail/dovecot.nix +++ b/nixos/modules/services/mail/dovecot.nix @@ -148,8 +148,8 @@ let doveConf = let - configVersion = cfg.settings.dovecot_config_version or null; - storageVersion = cfg.settings.dovecot_storage_version or null; + configVersion = cfg.settings.dovecot_config_version; + storageVersion = cfg.settings.dovecot_storage_version; remainingSettings = builtins.removeAttrs cfg.settings [ "dovecot_config_version" "dovecot_storage_version" @@ -578,6 +578,26 @@ in # 2.4-only options + dovecot_config_version = mkOption { + default = null; + description = '' + Dovecot configuration version. It uses the same versioning as Dovecot in general, e.g. 3.0.5. It specifies the configuration syntax, the used setting names and the expected default values. + + See . + ''; + type = nullOr str; + }; + + dovecot_storage_version = mkOption { + default = null; + description = '' + Dovecot storage file format version. It uses the same versioning as Dovecot in general, e.g. 3.0.5. It specifies the oldest Dovecot version that must be able to read files written by this Dovecot instance. + + See . + ''; + type = nullOr str; + }; + sieve_script_bin_path = mkOption { default = if isPre24 then null else "/tmp/dovecot-%{user|username|lower}"; defaultText = literalExpression ''