nixos-config/users/simon/modules/librewolf.nix

32 lines
1.1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config, lib, nixosConfig, ... }:
let
mkOverridesFile = prefs: ''
// Generated by Home Manager.
// Function taken from upstream home-manger,
// modified to use pref instead of defaultPref.
${lib.concatStrings (lib.mapAttrsToList (name: value: ''
pref("${name}", ${builtins.toJSON value});
'') prefs)}
'';
in
lib.mkIf nixosConfig.sbruder.gui.enable {
programs.librewolf = {
enable = true;
settings = {
"accessibility.force_disabled" = 1;
"browser.uidensity" = 1; # more compact layout
"identity.fxaccounts.enabled" = true;
"middlemouse.paste" = false;
"privacy.clearOnShutdown.history" = false;
"webgl.disabled" = false; # requires installing CanvasBlocker
#"network.http.referer.XOriginPolicy" = 2; # breaks sites that include images from restrictive sources
#"privacy.resistFingerprinting.letterboxing" = true; # quite annoying
};
};
# overrides home-managers definition
home.file.".librewolf/librewolf.overrides.cfg".text = lib.mkForce (mkOverridesFile config.programs.librewolf.settings);
}