wip: switch to librewolf

This commit is contained in:
Ranomier 2025-06-04 22:43:01 +02:00
parent 0b79642f7e
commit af0bb8743e
4 changed files with 48 additions and 11 deletions

View file

@ -44,6 +44,21 @@
]; ];
}; };
librewolf = {
executable = "${pkgs.librewolf}/bin/librewolf";
profile = "${pkgs.firejail}/etc/firejail/librewolf.profile";
extraArgs = [
# Required for U2F USB stick
"--ignore=private-dev"
# Enforce dark mode
"--env=GTK_THEME=Adwaita:dark"
# Enable system notifications
"--dbus-user.talk=org.freedesktop.Notifications"
# For screen sharing
"--dbus-user.talk=org.freedesktop.portal.*"
];
};
nyxt = { nyxt = {
executable = "${pkgs.nyxt}/bin/nyxt"; executable = "${pkgs.nyxt}/bin/nyxt";
profile = "${pkgs.firejail}/etc/firejail/chromium-browser.profile"; profile = "${pkgs.firejail}/etc/firejail/chromium-browser.profile";

View file

@ -1,7 +1,22 @@
{ {pkgs, ...}: let
package = pkgs.librewolf;
in {
imports = [ imports = [
./brave.nix ./brave.nix
./firefox.nix #./firefox.nix
./librewolf.nix
./nyxt.nix ./nyxt.nix
]; ];
environment.sessionVariables.DEFAULT_BROWSER =
"${package}/bin/"
+ builtins.replaceStrings [".desktop"] [""] package.desktopItem.name;
xdg.mime.defaultApplications = let
browser_desktop_file = package.desktopItem.name;
in {
"text/html" = browser_desktop_file;
"x-scheme-handler/http" = browser_desktop_file;
"x-scheme-handler/https" = browser_desktop_file;
};
} }

View file

@ -1,13 +1,10 @@
{pkgs, ...}: { {pkgs, ...}: let
# The logical browser of choice package = pkgs.firefox;
programs.firefox.enable = true;
xdg.mime.defaultApplications = let
browser_desktop_file = "firefox.desktop";
in { in {
"text/html" = browser_desktop_file; # The logical browser of choice
"x-scheme-handler/http" = browser_desktop_file; programs.firefox = {
"x-scheme-handler/https" = browser_desktop_file; enable = true;
package = package;
}; };
environment.sessionVariables.DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
} }

View file

@ -0,0 +1,10 @@
{pkgs, ...}: let
package = pkgs.librewolf;
in {
# The logical browser of choice
programs.firefox = {
enable = true;
package = package;
};
}