blob: 406f9b7f413c938ed70d730fdb7269cd452d1af7 (
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
|
{
inputs,
pkgs,
lib,
...
}:
let
extension = shortId: guid: {
name = guid;
value = {
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
installation_mode = "normal_installed";
private_browsing = true;
default_area = "menupanel"; # menupanel = unpin, navbar = pin
};
};
prefs = {
"browser.aboutConfig.showWarning" = false;
"browser.sessionstore.resume_from_crash" = false;
"browser.sessionstore.restore_on_demand" = false;
"browser.sessionstore.restore_tabs_lazily" = false;
"browser.sessionstore.restore_windows_to_virtual_desktop" = false;
"browser.sessionstore.max_resumed_crashes" = 0;
"gfx.webrender.all" = true;
"gfx.webrender.compositor" = true;
"gfx.x11-egl.force-enabled" = true;
"layers.acceleration.force-enabled" = true;
"media.ffmpeg.vaapi.enabled" = true;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"zen.welcome-screen.seen" = true;
};
extensions = [
(extension "ublock-origin" "uBlock0@raymondhill.net")
(extension "darkreader" "addon@darkreader.org")
(extension "enhanced-h264ify" "{9a41dee2-b924-4161-a971-7fb35c053a4a}")
(extension "sponsorblock" "sponsorBlocker@ajay.app")
];
in
{
home.packages = [
(pkgs.wrapFirefox
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped
{
extraPrefs = lib.concatLines (
lib.mapAttrsToList (
name: value: "lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});"
) prefs
);
extraPolicies = {
DisableTelemetry = true;
AutofillAddressEnabled = true;
AutofillCreditCardEnabled = false;
DisableAppUpdate = true;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DontCheckDefaultBrowser = true;
NoDefaultBookmarks = true;
DisableFirefoxScreenshots = true;
OfferToSaveLogins = false;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
DNSOverHTTPS = {
Enabled = true;
ProviderURL = "https://dns.quad9.net/dns-query";
Locked = true;
Fallback = true;
};
ExtensionSettings = builtins.listToAttrs extensions;
SearchEngines = {
Default = "DuckDuckGo";
PreventInstalls = true;
Remove = [
"Google"
"Bing"
];
Add = [
{
Name = "google";
URLTemplate = "https://www.google.com/search?q={searchTerms}";
IconURL = "https://www.google.com/favicon.ico";
Alias = ":g";
}
{
Name = "Nixpkgs";
URLTemplate = "https://search.nixos.org/packages?query={searchTerms}";
IconURL = "https://wiki.nixos.org/favicon.ico";
Alias = ":np";
}
{
Name = "Nixpkgs";
URLTemplate = "https://search.nixos.org/packages?query={searchTerms}";
IconURL = "https://wiki.nixos.org/favicon.ico";
Alias = ":np";
}
{
Name = "NixOS options";
URLTemplate = "https://search.nixos.org/options?query={searchTerms}";
IconURL = "https://wiki.nixos.org/favicon.ico";
Alias = ":no";
}
{
Name = "NixOS Wiki";
URLTemplate = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
IconURL = "https://wiki.nixos.org/favicon.ico";
Alias = ":nw";
}
{
Name = "noogle";
URLTemplate = "https://noogle.dev/q?term={searchTerms}";
IconURL = "https://noogle.dev/favicon.ico";
Alias = ":ng";
}
];
};
};
}
)
];
}
|