about summary refs log tree commit diff
path: root/home/firefox/default.nix
blob: 682f2ff4f266f6f29169004cee9537cf1a0744d3 (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
{ config, lib, pkgs, ... }:
let cfg = config.my.home.firefox;
in
{
  options.my.home.firefox = with lib; {
    enable = mkEnableOption "firefox configuration";
  };

  config.programs.firefox = lib.mkIf cfg.enable {
    enable = true;
    profiles = {
      default = {
        extensions = with pkgs.nur.repos.rycee.firefox-addons; [
          pkgs.nur.repos.rycee.firefox-addons."1password-x-password-manager"
          consent-o-matic
          refined-github
          sponsorblock
          ublock-origin
        ];
        settings = {
          ## nix handle updates
          "app.update.auto" = false;
          "browser.bookmarks.showMobileBookmarks" = false;
          "browser.compactmode.show" = true;
          "browser.contentblocking.category" = "strict";
          "browser.search.countryCode" = "US";
          "browser.search.defaultenginename" = "DuckDuckGo";
          "browser.search.isUS" = true;
          "browser.search.region" = "US";
          "browser.search.selectedEngine" = "DuckDuckGo";
          ## don't check if it's the default browser
          "browser.shell.checkDefaultBrowser" = false;
          "browser.startup.homepage" = "https://duckduckgo.com";
          "browser.urlbar.placeholderName" = "DuckDuckGo";
          ## keep this with ff 96
          "media.ffmpeg.vaapi.enabled" = true;
          ## remove on ff 96
          "media.ffvpx.enabled" = false;
          ## remove on ff 96
          "media.navigator.mediadatadecoder_vpx_enabled" = true;
          "media.peerconnection.enabled" = true;
          ## keep this with ff 96
          "media.rdd-ffmpeg.enabled" = true;
          ## remove on ff 96
          "media.rdd-vpx.enabled" = false;
          ## Block third-party cookies
          "network.cookie.cookieBehavior" = 1;
          "privacy.donottrackheader.enabled" = true;
          "privacy.trackingprotection.enabled" = true;
          "privacy.trackingprotection.socialtracking.enabled" = true;
        };

        userChrome = ''
          #TabsToolbar {
          visibility: collapse;
          }
        '';
      };
    };
  };
}