mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08: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:
@@ -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 {
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
}));
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user