summaryrefslogtreecommitdiff
path: root/modules/nixos/thunderbird.nix
blob: e598e2197f471eae35c51d47a2cd4c3e1be62ff3 (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
{
  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 =
          config.hm.programs.firefox.profiles.default.settings
          // {
            "app.donation.eoy.version.viewed" = 999;
            "browser.display.document_color_use" = 2;
            "browser.display.use_system_colors" = true;
            "browser.fixup.alternate.enabled" = false;
            "calendar.extract.service.enabled" = false;
            "calendar.timezone.local" = "UTC";
            "extensions.cardbook.useOnlyEmail" = true;
            "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" = 9220;
            "mail.compose.warn_public_recipients.aggressive" = true;
            "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.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;
            "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;
          };
      };
    };
  };
}