about summary refs log tree commit diff
path: root/home/firefox.nix
blob: a982a2e8f5ab30d23e350e29830cec447babb0f5 (plain) (blame)
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
{ pkgs, ... }: {
  programs.firefox = {
    enable = true;
    package = pkgs.firefox-bin;
    profiles.default = {
      isDefault = true;
      extensions = with pkgs.nur.repos.rycee.firefox-addons; [
        ublock-origin
        onepassword-password-manager
      ];
      bookmarks = [
        {
          name = "GitHub Notifications";
          keyword = "n";
          url = "https://github.com/notifications?query=is%3Aunread";
        }
        {
          name = "GitHub Pull Requests";
          keyword = "p";
          url = "https://github.com/pulls";
        }
      ];
      search = {
        default = "DuckDuckGo";
        engines = {
          "Nix Packages" = {
            urls = [
              {
                template = "https://search.nixos.org/packages";
                params = [
                  {
                    name = "type";
                    value = "packages";
                  }
                  {
                    name = "query";
                    value = "{searchTerms}";
                  }
                ];
              }
            ];
            icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
            definedAliases = [ "np" ];
          };
          "Google".metaData.hidden = true;
          "Amazon.com".metaData.hidden = true;
          "Bing".metaData.hidden = true;
          "eBay".metaData.hidden = true;
          "Wikipedia (en)".metaData.alias = "w";
        };
        force = true;
      };
      settings = {
        "app.update.auto" = false;
        "app.shield.optoutstudies.enabled" = false;

        "browser.bookmarks.restore_default_bookmarks" = false;
        "browser.bookmarks.showMobileBookmarks" = false;
        "browser.compactmode.show" = true;
        "browser.urlbar.placeholderName" = "search";
        "browser.shell.checkDefaultBrowser" = false;
        "browser.contentblocking.category" = "strict";
        "browser.startup.page" = 3; # Restore previous windows and tabs on startup.
        "browser.warnOnQuit" = false;
        "browser.formfill.enable" = false;
        "browser.newtabpage.enabled" = false; # Make new tabs blank
        "browser.newtabpage.activity-stream.feeds.section.topstories" = false;
        "browser.newtabpage.activity-stream.feeds.telemetry" = false;
        "browser.newtabpage.activity-stream.feeds.topsites" = false;
        "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = "duckduckgo";
        "browser.newtabpage.activity-stream.showSponsored" = false;
        "browser.newtabpage.activity-stream.telemetry" = false;
        "browser.urlbar.suggest.quicksuggest.nonsponsored" = false;
        "browser.urlbar.suggest.quicksuggest.sponsored" = false;

        "dom.forms.autocomplete.formautofill" = false; # Disable autofill

        "extensions.formautofill.addresses.enabled" = false;
        "extensions.formautofill.creditCards.enabled" = false; # Disable credit cards
        "extensions.htmlaboutaddons.inline-options.enabled" = false;
        "extensions.htmlaboutaddons.recommendations.enabled" = false;
        "extensions.pocket.enabled" = false;
        "extensions.pocket.showHome" = false;

        # Disable Sponsored Top Sites
        "services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" = false;

        "network.http.referer.spoofSource" = true;

        "privacy.donottrackheader.value" = 1;
        "privacy.donottrackheader.enabled" = true;
      };
    };
  };
}