2022-09-21 18:03:17 +02:00
|
|
|
{
|
|
|
|
imports = [ ../../accounts/email-test-accounts.nix ];
|
|
|
|
|
|
|
|
accounts.email.accounts = {
|
|
|
|
"hm@example.com" = {
|
|
|
|
thunderbird = {
|
|
|
|
enable = true;
|
|
|
|
profiles = [ "first" ];
|
|
|
|
};
|
|
|
|
|
2023-02-11 20:29:48 +01:00
|
|
|
aliases = [ "home-manager@example.com" ];
|
|
|
|
|
2022-09-21 18:03:17 +02:00
|
|
|
gpg.key = "ABC";
|
|
|
|
|
|
|
|
imap = {
|
|
|
|
port = 123;
|
|
|
|
tls.enable = true;
|
|
|
|
};
|
|
|
|
smtp.port = 456;
|
2024-01-09 15:19:17 +01:00
|
|
|
|
|
|
|
signature = {
|
|
|
|
text = "signature";
|
|
|
|
showSignature = "append";
|
|
|
|
};
|
2022-09-21 18:03:17 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
2023-03-25 21:57:47 +01:00
|
|
|
userChrome = ''
|
|
|
|
* { color: blue !important; }
|
|
|
|
'';
|
|
|
|
userContent = ''
|
|
|
|
* { color: red !important; }
|
|
|
|
'';
|
2023-04-04 23:37:41 +02:00
|
|
|
extraConfig = ''
|
|
|
|
user_pref("mail.html_compose", false);
|
|
|
|
'';
|
2022-09-21 18:03:17 +02:00
|
|
|
};
|
|
|
|
|
2024-03-03 09:33:53 +01:00
|
|
|
second.settings = {
|
|
|
|
"second.setting" = "some-test-setting";
|
|
|
|
second.nested.evenFurtherNested = [ 1 2 3 ];
|
|
|
|
};
|
2022-09-21 18:03:17 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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}
|
2023-03-25 21:57:47 +01:00
|
|
|
|
|
|
|
assertFileExists home-files/.thunderbird/first/chrome/userChrome.css
|
|
|
|
assertFileContent home-files/.thunderbird/first/chrome/userChrome.css \
|
|
|
|
<(echo "* { color: blue !important; }")
|
|
|
|
|
|
|
|
assertFileExists home-files/.thunderbird/first/chrome/userContent.css
|
|
|
|
assertFileContent home-files/.thunderbird/first/chrome/userContent.css \
|
|
|
|
<(echo "* { color: red !important; }")
|
2022-09-21 18:03:17 +02:00
|
|
|
'';
|
|
|
|
}
|