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:
parent
db4386d686
commit
597f9c2f06
1 changed files with 12 additions and 2 deletions
|
@ -358,7 +358,17 @@ in {
|
||||||
|
|
||||||
accounts.email.accounts = mkOption {
|
accounts.email.accounts = mkOption {
|
||||||
type = with types;
|
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 = {
|
options.thunderbird = {
|
||||||
enable =
|
enable =
|
||||||
mkEnableOption "the Thunderbird mail client for this account";
|
mkEnableOption "the Thunderbird mail client for this account";
|
||||||
|
@ -409,7 +419,7 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
}));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue