mirror of
https://github.com/nix-community/home-manager
synced 2024-12-27 12:19:48 +01:00
b764068a50
Add a new Thunderbird module that uses the configuration in `accounts.email.accounts` to setup SMTP and IMAP accounts. Multiple profiles are not supported at this point.
64 lines
1.4 KiB
Nix
64 lines
1.4 KiB
Nix
{
|
|
imports = [ ../../accounts/email-test-accounts.nix ];
|
|
|
|
accounts.email.accounts = {
|
|
"hm@example.com" = {
|
|
thunderbird = {
|
|
enable = true;
|
|
profiles = [ "first" ];
|
|
};
|
|
|
|
gpg.key = "ABC";
|
|
|
|
imap = {
|
|
port = 123;
|
|
tls.enable = true;
|
|
};
|
|
smtp.port = 456;
|
|
};
|
|
|
|
hm-account = {
|
|
thunderbird = {
|
|
enable = true;
|
|
settings = id: {
|
|
"mail.identity.id_${id}.protectSubject" = false;
|
|
"mail.identity.id_${id}.autoEncryptDrafts" = false;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.thunderbird = {
|
|
enable = true;
|
|
|
|
profiles = {
|
|
first = {
|
|
isDefault = true;
|
|
withExternalGnupg = true;
|
|
};
|
|
|
|
second.settings = { "second.setting" = "some-test-setting"; };
|
|
};
|
|
|
|
settings = {
|
|
"general.useragent.override" = "";
|
|
"privacy.donottrackheader.enabled" = true;
|
|
};
|
|
};
|
|
|
|
test.stubs.thunderbird = { };
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.thunderbird/profiles.ini
|
|
assertFileContent home-files/.thunderbird/profiles.ini \
|
|
${./thunderbird-expected-profiles.ini}
|
|
|
|
assertFileExists home-files/.thunderbird/first/user.js
|
|
assertFileContent home-files/.thunderbird/first/user.js \
|
|
${./thunderbird-expected-first.js}
|
|
|
|
assertFileExists home-files/.thunderbird/second/user.js
|
|
assertFileContent home-files/.thunderbird/second/user.js \
|
|
${./thunderbird-expected-second.js}
|
|
'';
|
|
}
|