forked from librephoenix/nixos-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibrewolf.nix
46 lines (39 loc) · 1.9 KB
/
librewolf.nix
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
{ pkgs, userSettings, ... }:
{
# Module installing librewolf as default browser
home.packages = if (userSettings.wmType == "wayland") then [ pkgs.librewolf-wayland ]
else [ pkgs.librewolf ];
home.sessionVariables = if (userSettings.wmType == "wayland")
then { DEFAULT_BROWSER = "${pkgs.librewolf-wayland}/bin/librewolf";}
else
{ DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf";};
home.file.".librewolf/librewolf.overrides.cfg".text = ''
defaultPref("font.name.serif.x-western","''+userSettings.font+''");
defaultPref("font.size.variable.x-western",20);
defaultPref("browser.toolbars.bookmarks.visibility","always");
defaultPref("privacy.resisttFingerprinting.letterboxing", true);
defaultPref("network.http.referer.XOriginPolicy",2);
defaultPref("privacy.clearOnShutdown.history",true);
defaultPref("privacy.clearOnShutdown.downloads",true);
defaultPref("privacy.clearOnShutdown.cookies",true);
defaultPref("gfx.webrender.software.opengl",false);
defaultPref("webgl.disabled",true);
pref("font.name.serif.x-western","''+userSettings.font+''");
pref("font.size.variable.x-western",20);
pref("browser.toolbars.bookmarks.visibility","always");
pref("privacy.resisttFingerprinting.letterboxing", true);
pref("network.http.referer.XOriginPolicy",2);
pref("privacy.clearOnShutdown.history",true);
pref("privacy.clearOnShutdown.downloads",true);
pref("privacy.clearOnShutdown.cookies",true);
pref("gfx.webrender.software.opengl",false);
pref("webgl.disabled",true);
'';
xdg.mimeApps.defaultApplications = {
"text/html" = "librewolf.desktop";
"x-scheme-handler/http" = "librewolf.desktop";
"x-scheme-handler/https" = "librewolf.desktop";
"x-scheme-handler/about" = "librewolf.desktop";
"x-scheme-handler/unknown" = "librewolf.desktop";
};
}