From 128bdeb3c5d185af082b8aabd70a99ad1a1466e5 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Mon, 24 Mar 2025 21:57:25 +0800 Subject: [PATCH] nxios/cyrus-imap: fix cyrus-imap certs options --- nixos/modules/services/mail/cyrus-imap.nix | 32 ++++++++++------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/nixos/modules/services/mail/cyrus-imap.nix b/nixos/modules/services/mail/cyrus-imap.nix index 12d63431cd73..3ffd74451b6c 100644 --- a/nixos/modules/services/mail/cyrus-imap.nix +++ b/nixos/modules/services/mail/cyrus-imap.nix @@ -72,6 +72,20 @@ let } cfg.imapdSettings; in { + imports = [ + (lib.mkRenamedOptionModule + [ "services" "cyrus-imap" "sslServerCert" ] + [ "services" "cyrus-imap" "imapdSettings" "tls_server_cert" ] + ) + (lib.mkRenamedOptionModule + [ "services" "cyrus-imap" "sslServerKey" ] + [ "services" "cyrus-imap" "imapdSettings" "tls_server_key" ] + ) + (lib.mkRenamedOptionModule + [ "services" "cyrus-imap" "sslCACert" ] + [ "services" "cyrus-imap" "imapdSettings" "tls_client_ca_file" ] + ) + ]; options.services.cyrus-imap = { enable = mkEnableOption "Cyrus IMAP, an email, contacts and calendar server"; debug = mkEnableOption "debugging messages for the Cyrus master process"; @@ -294,24 +308,6 @@ in description = "Path to the configuration file used for Cyrus."; apply = v: if v != null then v else pkgs.writeText "cyrus.conf" cyrusConfig; }; - - sslCACert = mkOption { - type = nullOr str; - default = null; - description = "File path which containing one or more CA certificates to use."; - }; - - sslServerCert = mkOption { - type = nullOr str; - default = null; - description = "File containing the global certificate used for all services (IMAP, POP3, LMTP, Sieve)"; - }; - - sslServerKey = mkOption { - type = nullOr str; - default = null; - description = "File containing the private key belonging to the global server certificate."; - }; }; config = mkIf cfg.enable {