mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 13:39:46 +01:00
4974dfb26e
Uses the JSON type, just like the Firefox module, so that nested sets can be used.
91 lines
2.3 KiB
Nix
91 lines
2.3 KiB
Nix
{
|
|
imports = [ ../../accounts/email-test-accounts.nix ];
|
|
|
|
accounts.email.accounts = {
|
|
"hm@example.com" = {
|
|
thunderbird = {
|
|
enable = true;
|
|
profiles = [ "first" ];
|
|
};
|
|
|
|
aliases = [ "home-manager@example.com" ];
|
|
|
|
gpg.key = "ABC";
|
|
|
|
imap = {
|
|
port = 123;
|
|
tls.enable = true;
|
|
};
|
|
smtp.port = 456;
|
|
|
|
signature = {
|
|
text = "signature";
|
|
showSignature = "append";
|
|
};
|
|
};
|
|
|
|
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;
|
|
userChrome = ''
|
|
* { color: blue !important; }
|
|
'';
|
|
userContent = ''
|
|
* { color: red !important; }
|
|
'';
|
|
extraConfig = ''
|
|
user_pref("mail.html_compose", false);
|
|
'';
|
|
};
|
|
|
|
second.settings = {
|
|
"second.setting" = "some-test-setting";
|
|
second.nested.evenFurtherNested = [ 1 2 3 ];
|
|
};
|
|
};
|
|
|
|
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}
|
|
|
|
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; }")
|
|
'';
|
|
}
|