summaryrefslogtreecommitdiff
path: root/modules/nixos/thunderbird.nix
blob: 2261dcd7c84373dce9a995537cfaa88a075aad3b (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
{
  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;
      };
      settings = {
        "app.update.auto" = false;
        "browser.display.document_color_use" = 2;
        "browser.display.use_system_colors" = true;
        "browser.search.region" = "US";
        "browser.search.update" = false;
        "datareporting.healthreport.uploadEnabled" = false;
        "full-screen-api.warning.delay" = 0;
        "full-screen-api.warning.timeout" = 0;
        "general.autoScroll" = true;
        "general.smoothScroll" = true;
        "mail.default_send_format" = 0;
        "mail.tabs.drawInTitlebar" =
          if config.nixfiles.modules.kde.enable
          then 1
          else 0;
        "mailnews.start_page.url" = "about:blank";
        "media.autoplay.blocking_policy" = 2;
        "media.autoplay.default" = 5;
        "media.autoplay.enabled" = false;
        "media.hardwaremediakeys.enabled" = false;
        "network.cookie.cookieBehavior" = 2;
        "places.history.enabled" = false;
        "reader.parse-on-load.enabled" = false;
        "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
      };
    };
  };
}