blob: fd5780989db798d7487cff1e02f46e5c211c64ba (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
{
config,
lib,
pkgs,
...
}:
let
cfg = config.hm.soft.browser;
in
{
options.hm.soft.browser = {
librewolf.enable = lib.mkEnableOption "LibreWolf browser";
brave.enable = lib.mkEnableOption "Brave browser";
};
config = lib.mkMerge [
(lib.mkIf cfg.librewolf.enable {
programs.librewolf = {
enable = true;
settings = {
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
profiles = {
main = {
id = 0;
name = "main";
isDefault = true;
search = {
force = true;
engines = {
"SearXNG" = {
urls = [ { template = "https://sxng.violets-purgatory.dev/search?q={searchTerms}"; } ];
definedAliases = [ "@s" ];
};
"NixOS Packages" = {
urls = [ { template = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; } ];
icon = "";
definedAliases = [ "@np" ];
};
"NixOS Options" = {
urls = [ { template = "https://search.nixos.org/options?channel=unstable&query={searchTerms}"; } ];
icon = "";
definedAliases = [ "@no" ];
};
"Home Manager Options" = {
urls = [
{ template = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master"; }
];
definedAliases = [ "@hm" ];
};
};
};
settings = {
"identity.fxaccounts.enabled" = true;
# --- Privacy & Fingerprinting ---
"privacy.resistFingerprinting" = true;
"privacy.fingerprintingProtection" = true;
"privacy.query_stripping.enabled" = true;
"privacy.query_stripping.enabled.pbmode" = true;
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.socialtracking.enabled" = true;
"privacy.trackingprotection.emailtracking.enabled" = true;
"privacy.bounceTrackingProtection.mode" = 1;
"privacy.annotate_channels.strict_list.enabled" = true;
"privacy.clearOnShutdown_v2.formdata" = true;
# --- Data Collection & Form Security ---
"dom.forms.autocomplete.formautofill" = false;
"signon.management.page.breach-alerts.enabled" = false;
"browser.translations.enable" = false;
"browser.region.update.enabled" = false;
# --- Search & URL Bar ---
"browser.urlbar.shortcuts.bookmarks" = false;
"browser.urlbar.shortcuts.history" = false;
"browser.urlbar.shortcuts.tabs" = false;
"browser.urlbar.shortcuts.actions" = false;
"browser.urlbar.showSearchTerms.enabled" = false;
# --- Networking & Performance ---
"network.proxy.type" = 0;
"network.prefetch-next" = false;
"network.predictor.enabled" = false;
"network.http.speculative-parallel-limit" = 0;
"network.early-hints.preconnect.max_connections" = 0;
"network.connectivity-service.enabled" = false;
"network.captive-portal-service.enabled" = false;
"security.tls.enable_0rtt_data" = false;
# --- Interface & De-clutter ---
"browser.startup.page" = 3;
"browser.startup.homepage" = "chrome://browser/content/blanktab.html";
"browser.newtabpage.enabled" = false;
"browser.newtabpage.activity-stream.showSearch" = false;
"browser.newtabpage.activity-stream.showSponsoredCheckboxes" = false;
"browser.bookmarks.restore_default_bookmarks" = false;
"media.hardwaremediakeys.enabled" = false;
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
"layout.spellcheckDefault" = 0;
# --- Safe Browsing (Privacy Trade-off) ---
"browser.safebrowsing.downloads.remote.enabled" = false;
"browser.safebrowsing.downloads.remote.block_potentially_unwanted" = false;
"browser.safebrowsing.downloads.remote.block_uncommon" = false;
};
userChrome = ''
#TabsToolbar { visibility: collapse !important; }
#sidebar-header { display: none !important; }
#toolbar-menubar { display: none !important; }
'';
};
privacy = {
id = 1;
name = "privacy";
settings = {
"media.peerconnection.enabled" = false;
"network.proxy.type" = 1;
"network.proxy.http" = "127.0.0.1";
"network.proxy.http_port" = 4444;
"network.proxy.ssl" = "127.0.0.1";
"network.proxy.ssl_port" = 4444;
"network.proxy.no_proxies_on" = "localhost, 127.0.0.1";
"network.http.proxy.pipelining" = true;
"network.proxy.share_proxy_settings" = true;
"network.prefetch-next" = false;
"network.dns.disablePrefetch" = true;
};
userChrome = ''
#TabsToolbar { visibility: collapse !important; }
#sidebar-header { display: none !important; }
#toolbar-menubar { display: none !important; }
'';
};
};
};
})
(lib.mkIf cfg.brave.enable {
home.packages = [ pkgs.brave ];
})
];
}
|