2023-11-12 05:38:43 +00:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
mkNixPak = inputs.nixpak.lib.nixpak {
|
|
|
|
inherit (pkgs) lib;
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
|
|
|
|
|
|
|
librewolf = mkNixPak {
|
|
|
|
config = {
|
|
|
|
config,
|
|
|
|
sloth,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
app.package = pkgs.librewolf;
|
|
|
|
flatpak.appId = "io.gitlab.librewolf-community";
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
(inputs.nixpak-pkgs + "/pkgs/modules/gui-base.nix")
|
|
|
|
(inputs.nixpak-pkgs + "/pkgs/modules/network.nix")
|
|
|
|
];
|
|
|
|
|
|
|
|
# Specified in https://github.com/schizofox/schizofox/blob/main/modules/hm/default.nix
|
|
|
|
# I really don't have any idea what am I doing, it just works™
|
2023-11-14 03:28:47 +00:00
|
|
|
dbus.policies = {
|
|
|
|
"io.gitlab.librewolf.*" = "own";
|
|
|
|
};
|
|
|
|
|
2023-11-12 05:38:43 +00:00
|
|
|
bubblewrap = let
|
|
|
|
envSuffix = envKey: sloth.concat' (sloth.env envKey);
|
|
|
|
in {
|
|
|
|
bind.rw = [
|
|
|
|
"/tmp/.X11-unix"
|
|
|
|
(sloth.envOr "XAUTHORITY" "/no-xauth")
|
|
|
|
(envSuffix "XDG_RUNTIME_DIR" "/dconf")
|
|
|
|
(sloth.concat' sloth.homeDir "/.librewolf")
|
|
|
|
(sloth.concat' sloth.homeDir "/Downloads")
|
|
|
|
];
|
|
|
|
bind.ro = [
|
|
|
|
"/etc/localtime"
|
|
|
|
"/sys/bus/pci"
|
|
|
|
|
2024-01-09 18:15:24 +00:00
|
|
|
["${config.app.package}/lib/librewolf" "/app/etc/librewolf"]
|
2023-11-12 05:38:43 +00:00
|
|
|
(sloth.concat' sloth.xdgConfigHome "/dconf")
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
2023-11-05 12:50:08 +00:00
|
|
|
programs.librewolf = {
|
|
|
|
enable = true;
|
2023-11-12 05:38:43 +00:00
|
|
|
package = librewolf.config.env;
|
2023-11-05 12:50:08 +00:00
|
|
|
settings = {
|
2023-12-21 09:25:21 +00:00
|
|
|
# https://codeberg.org/librewolf/settings/src/branch/master/librewolf.cfg
|
|
|
|
# https://github.com/yokoffing/Betterfox/blob/main/librewolf.overrides.cfg
|
2023-11-05 12:50:08 +00:00
|
|
|
|
2023-12-21 09:25:21 +00:00
|
|
|
### Restore disabled functions
|
|
|
|
"browser.cache.disk.enable" = true;
|
|
|
|
"identity.fxaccounts.enabled" = true;
|
|
|
|
"media.eme.enabled" = true;
|
|
|
|
"privacy.donottrackheader.enabled" = false;
|
|
|
|
"privacy.globalprivacycontrol.enabled" = false;
|
|
|
|
"privacy.resistFingerprinting" = false;
|
|
|
|
"privacy.sanitize.sanitizeOnShutdown" = false;
|
2023-11-05 12:50:08 +00:00
|
|
|
"security.OCSP.enabled" = 0;
|
|
|
|
"security.OCSP.require" = false;
|
|
|
|
"security.pki.crlite_mode" = 2;
|
|
|
|
"webgl.disabled" = false;
|
|
|
|
|
2023-12-21 09:25:21 +00:00
|
|
|
### Smooth scrolling
|
2023-11-05 12:50:08 +00:00
|
|
|
"apz.overscroll.enabled" = true;
|
|
|
|
"general.smoothScroll" = true;
|
|
|
|
"general.smoothScroll.msdPhysics.enabled" = true;
|
|
|
|
"general.smoothScroll.msdPhysics.motionBeginSpringConstant" = 600;
|
|
|
|
"mousewheel.default.delta_multiplier_y" = 75;
|
2023-12-21 09:25:21 +00:00
|
|
|
|
|
|
|
### Misc
|
|
|
|
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
2023-11-05 12:50:08 +00:00
|
|
|
};
|
|
|
|
};
|
2024-01-09 19:36:50 +00:00
|
|
|
|
|
|
|
home.sessionVariables = {
|
|
|
|
MOZ_USE_XINPUT2 = "1";
|
|
|
|
};
|
2023-11-05 12:50:08 +00:00
|
|
|
}
|