From fa949a7b18830f4b78dbd8a7c19f65344e16bf4d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 6 Jul 2025 23:46:09 +0200 Subject: [PATCH] nixos/dovecot: add marker to indicate new systemd unit name This is a helper to escape infinite recursion when trying to check whether the unit name is set before setting options on it. --- nixos/modules/services/mail/dovecot.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix index 7d7ba6b867a5..8548b3107346 100644 --- a/nixos/modules/services/mail/dovecot.nix +++ b/nixos/modules/services/mail/dovecot.nix @@ -296,6 +296,20 @@ in enableLmtp = mkEnableOption "starting the LMTP listener (when Dovecot is enabled)"; + hasNewUnitName = mkOption { + type = types.bool; + default = true; + readOnly = true; + internal = true; + description = '' + Inspectable option to confirm that the dovecot module uses the new + `dovecot.service` name, instead of `dovecot2.service`. + + This is a helper added for the nixos-mailserver project and can be + removed after branching off nixos-25.11. + ''; + }; + protocols = mkOption { type = types.listOf types.str; default = [ ];