From 597f9c2f06af8791b31c48ad05471ac5afbd0f0a Mon Sep 17 00:00:00 2001 From: Jono Date: Sun, 9 Mar 2025 16:38:46 -0700 Subject: [PATCH] thunderbird: set additional gmail server settings (#6579) When email account is gmail in thunderbird, set additional server settings. As of March 2025, gmail only allows ssl/oauth0 authentication, so here I set the authMethod accordingly. Also setting 'is_gmail' to true in thunderbird settings such that labels and trash work out of the box when the email account flavor is "gmail". This brings in the gmail configs for how it handles folders, labels, and archiving messages. --- modules/programs/thunderbird.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/programs/thunderbird.nix b/modules/programs/thunderbird.nix index 8d9460996..48587c308 100644 --- a/modules/programs/thunderbird.nix +++ b/modules/programs/thunderbird.nix @@ -358,7 +358,17 @@ in { accounts.email.accounts = mkOption { type = with types; - attrsOf (submodule { + attrsOf (submodule ({ config, ... }: { + config.thunderbird = { + settings = lib.mkIf (config.flavor == "gmail.com") (id: { + "mail.server.server_${id}.authMethod" = + mkOptionDefault 10; # 10 = OAuth2 + "mail.server.server_${id}.socketType" = + mkOptionDefault 3; # SSL/TLS + "mail.server.server_${id}.is_gmail" = + mkOptionDefault true; # handle labels, trash, etc + }); + }; options.thunderbird = { enable = mkEnableOption "the Thunderbird mail client for this account"; @@ -409,7 +419,7 @@ in { ''; }; }; - }); + })); }; };