summaryrefslogtreecommitdiff
path: root/modules/thunderbird.nix
blob: 74af3b51378a440f432c23fea851cdd0c39d0c89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{ config, lib, ... }:
with lib;
let
  cfg = config.nixfiles.modules.thunderbird;
in
{
  options.nixfiles.modules.thunderbird.enable = mkEnableOption "Thunderbird";

  config = mkIf cfg.enable {
    nixfiles.modules.common.xdg.defaultApplications.thunderbird = [
      "message/rfc822"
      "x-scheme-handler/mailto"
    ];

    hm.programs.thunderbird = {
      enable = true;
      profiles.default = {
        isDefault = true;
        withExternalGnupg = true;
        # https://github.com/HorlogeSkynet/thunderbird-user.js/blob/master/user.js
        settings =
          with config.colors.withHashtag;
          config.hm.programs.firefox.profiles.default.settings
          // {
            "app.donation.eoy.version.viewed" = 999;
            "browser.display.background_color" = base00;
            "browser.display.background_color.dark" = base00;
            "browser.display.document_color_use" = 1; # Corresponds to "Never".
            "browser.display.foreground_color" = base05;
            "browser.display.foreground_color.dark" = base05;
            "browser.display.use_system_colors" = true;
            "browser.visited_color" = base0E;
            "browser.visited_color.dark" = base0E;
            "editor.background_color" = base00;
            "editor.editor.active_link_color" = base16;
            "editor.followed_link_color" = base0E;
            "editor.link_color" = base0D;
            "editor.text_color" = base05;
            "editor.use_custom_colors" = true;
            "extensions.activeThemeID" = "default-theme@mozilla.org";
            "javascript.enabled" = false;
            "mail.chat.enabled" = false;
            "mail.cloud_files.enabled" = false;
            "mail.collect_email_address_outgoing" = false;
            "mail.compose.add_link_preview" = false;
            "mail.compose.big_attachments.notify" = true;
            "mail.compose.big_attachments.threshold_kb" = 10000;
            "mail.compose.warn_public_recipients.aggressive" = true;
            "mail.compose.warn_public_recipients.threshold" = 15;
            "mail.default_send_format" = 1;
            "mail.html_compose" = false;
            "mail.html_sanitize.drop_conditional_css" = true;
            "mail.identity.default.compose_html" = false;
            "mail.inline_attachments" = false;
            "mail.instrumentation.askUser" = false;
            "mail.instrumentation.postUrl" = "";
            "mail.instrumentation.userOptedIn" = false;
            "mail.phishing.detection.disallow_form_actions" = true;
            "mail.phishing.detection.enabled" = true;
            "mail.phishing.detection.ipaddresses" = true;
            "mail.phishing.detection.mismatched_hosts" = true;
            "mail.provider.enabled" = false;
            "mail.rights.override" = true;
            "mail.sanitize_date_header" = true;
            "mail.shell.checkDefaultClient" = false;
            "mail.showCondensedAddresses" = false;
            "mail.suppress_content_language" = true;
            "mailnews.auto_config.addons_url" = "";
            "mailnews.auto_config.fetchFromExchange.enabled" = false;
            "mailnews.auto_config.fetchFromISP.enabled" = false;
            "mailnews.auto_config.fetchFromISP.sendEmailAddress" = false;
            "mailnews.auto_config.guess.enabled" = false;
            "mailnews.auto_config.guess.requireGoodCert" = true;
            "mailnews.auto_config.guess.sslOnly" = true;
            "mailnews.auto_config_url" = "";
            "mailnews.display.date_senders_timezone" = false;
            "mailnews.display.disallow_mime_handlers" = 3;
            "mailnews.display.html_as" = 3;
            "mailnews.display.original_date" = false;
            "mailnews.display.prefer_plaintext" = false;
            "mailnews.headers.sendUserAgent" = true;
            "mailnews.headers.showSender" = true;
            "mailnews.headers.showUserAgent" = false;
            "mailnews.headers.useMinimalUserAgent" = true;
            "mailnews.message_display.disable_remote_image" = true;
            "mailnews.reply_header_authorwrotesingle" = "#1 wrote:";
            "mailnews.reply_header_type" = 1;
            "mailnews.start_page.enabled" = false;
            "mailnews.start_page.url" = "about:blank";
            "media.mediasource.enabled" = false;
            "network.cookie.cookieBehavior" = 2;
            "network.cookie.cookieBehavior.pbmode" = 2;
            "permissions.default.image" = 2;
            "places.history.enabled" = false;
            "pref.privacy.disable_button.cookie_exceptions" = false;
            "pref.privacy.disable_button.view_cookies" = false;
            "pref.privacy.disable_button.view_passwords" = false;
          };
      };
    };
  };
}