1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-18 14:28:15 +00:00

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.
This commit is contained in:
Jono 2025-03-09 16:38:46 -07:00 committed by GitHub
parent db4386d686
commit 597f9c2f06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {
'';
};
};
});
}));
};
};