aboutsummaryrefslogtreecommitdiff
path: root/profiles/minimalConnections.nix
blob: 7ca2f1c482cb0bee6fded7f834318b66b17b5889 (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
{ ff, ... }: {
  meta.description = ''
    Prevent unnecessary connections while browsing.

    This profile assumes:
      - The user does not move the device into a network where it may be held captive
        before agreeing to usage terms.
      - We have otherwise blocked the installation of arbitrary extensions.
  '';

  # Sources:
  # https://support.mozilla.org/en-US/kb/how-stop-firefox-making-automatic-connections
  # https://github.com/intika/Librefox/blob/45a4d3ce647b8c896e81ce3e5ac5ddc95ff045e0/librefox/mozilla.cfg#L1167
  policies = {
    CaptivePortal = false;
    DisableTelemetry = true;
    NetworkPrediction = false;
    SearchSuggestEnabled = false;

    Preferences = ff.flattenAttrs {
      extensions = {
        blocklist.enabled = false;
        getAddons.showPane = false;
        htmlaboutaddons.recommendations.enabled = false;
      };
    };
  };

  preferences = {
    toolkit.telemetry = {
      enabled = false;
      server = "";
      unified = false;
      archive.enabled = false;

      newProfilePing.enabled = false;
      firstShutdownPing.enabled = false;
      shutdownPing.enabled = false;
      shutdownPingSender.enabled = false;

      # background hang reporting
      bhrPing.enabled = false;
      updatePing.enabled = false;
    };

    extensions = {
      blocklist.enabled = false;
      getAddons.showPane = false;
      getAddons.cache.enabled = false;
      htmlaboutaddons.recommendations.enabled = false;

      abuseReport = {
        url = "";
        amoDetailsURL = "";
      };
    };

    network = {
      predictor = {
        enable-prefetch = false;
        prefetch-next = false;
      };

      # Prevent FF from establishing connections on mouse-hover
      http.speculative-parallel-limit = 0;
    };

    services.settings.server = "";

    # TODO: what exactly does this block?
    services.blocklist.pinning.enabled = false;

    # don't send single words to search engine
    browser.fixup.dns_first_for_single_words = true;

    beacon.enabled = false;
    browser.send_pings = false;
  };
}