librewolf: Init

This is currently in testing, as qutebrowser has some severe drawbacks.
This commit is contained in:
Simon Bruder 2023-12-13 17:10:30 +01:00
parent 37219a1dd1
commit c4b904d1af
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
4 changed files with 34 additions and 1 deletions

View file

@ -10,6 +10,7 @@
./gpg.nix ./gpg.nix
./gtk.nix ./gtk.nix
./htop.nix ./htop.nix
./librewolf.nix
./logitech.nix ./logitech.nix
./mail ./mail
./makemkv.nix ./makemkv.nix

View file

@ -0,0 +1,31 @@
{ 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;
"network.http.referer.XOriginPolicy" = 2;
"privacy.clearOnShutdown.history" = false;
"webgl.disabled" = false; # requires installing CanvasBlocker
#"privacy.resistFingerprinting.letterboxing" = true; # quite annoying
};
};
# overrides home-managers definition
home.file.".librewolf/librewolf.overrides.cfg".text = lib.mkForce (mkOverridesFile config.programs.librewolf.settings);
}

View file

@ -197,6 +197,7 @@ in
"2" = [ "2" = [
{ app_id = "firefox"; } { app_id = "firefox"; }
{ app_id = "org.qutebrowser.qutebrowser"; } { app_id = "org.qutebrowser.qutebrowser"; }
{ class = "librewolf"; }
{ class = "qutebrowser"; } # workaround for qutebrowser running under Xwayland { class = "qutebrowser"; } # workaround for qutebrowser running under Xwayland
#{ class="Chromium"; } #{ class="Chromium"; }
]; ];

View file

@ -5,7 +5,7 @@
enable = nixosConfig.sbruder.gui.enable; enable = nixosConfig.sbruder.gui.enable;
defaultApplications = defaultApplications =
let let
browser = "org.qutebrowser.qutebrowser.desktop"; browser = "librewolf.desktop";
in in
{ {
"application/pdf" = "org.pwmt.zathura.desktop"; "application/pdf" = "org.pwmt.zathura.desktop";