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.
This commit is contained in:
Katalin Rebhan
2026-04-13 21:41:44 +02:00
parent a01f198b69
commit aea389e00d
+22 -2
View File
@@ -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 <https://doc.dovecot.org/latest/core/summaries/settings.html#dovecot_config_version>.
'';
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 <https://doc.dovecot.org/latest/core/summaries/settings.html#dovecot_storage_version>.
'';
type = nullOr str;
};
sieve_script_bin_path = mkOption {
default = if isPre24 then null else "/tmp/dovecot-%{user|username|lower}";
defaultText = literalExpression ''