aboutsummaryrefslogtreecommitdiff
path: root/firefox-configuration.nix
blob: 1e850f59faf5eaf70b0a344f7120fad48e196d6f (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
{ ... }: {
/*  activeProfiles = with profiles; [
  defaults

  addons.disableExtensionSignatureChecking
  addons.privacybadger
  addons.noscriptFork
  addons.qwantjuniorSystem

  minimalConnections
  minimalHome

];*/


  ocsp.enable = false;
  safebrowsing.disableAll = true;

  features = {
    disableAccounts = true;
    disableMedia = true;
    disableLocation = true;
    disablePocket = true;
    disableStudies = true;
    disableNormandy = true;
    disableUpdates = true;
  };

  ui.removeClutter = true;

  dataFrugality = {
    forgetActivity = true;
    replaceAllUrls = true;
  };

  trackingProtection.disableAll = true;

  # This is very hacky, but Firefox really resists setting the default search engine
  # by any other means. Only builtin search engines are allowed to make themselves default
  # without prompting for user consent.
  omnija.browser.patchCommand =
    let searchEnginesInfo = {
          default = {
            searchDefault = "qwantjunior";
            searchOrder = [ "qwantjunior" "ddg" ];
            visibleDefaultEngines = [ "qwantjunior" "ddg" ];
          };
          regionOverrides = {};
          locales = {};
        };
    in ''
    pushd chrome/browser/search-extensions
    cp -r ${addons/qwantjunior} ./qwantjunior
    cp ${builtins.toFile "list.json" (builtins.toJSON searchEnginesInfo)} list.json
    popd
  '';

  policies.RequestedLocales = [ "de-DE" "en-US" ];
}