From 74c5390b20e21dca2c9a9afeb407108c0289a814 Mon Sep 17 00:00:00 2001 From: notohh Date: Mon, 3 Apr 2023 07:29:35 -0400 Subject: [PATCH] feat: init librewolf as default browser --- home/librewolf/default.nix | 41 ++++++++++++++++++++++++++++++++++++++ hosts/tsuki/home.nix | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 home/librewolf/default.nix diff --git a/home/librewolf/default.nix b/home/librewolf/default.nix new file mode 100644 index 0000000..566932b --- /dev/null +++ b/home/librewolf/default.nix @@ -0,0 +1,41 @@ +{ + ... +}: { + programs.librewolf = { + enable = true; + settings = { + "webgl.disabled" = false; + "privacy.resistFingerprinting" = false; + "browser.warnOnQuitShortcut" = false; + "identity.fxaccounts.enabled" = false; + "browser.sessionstore.resume_from_crash" = true; + "privacy.resistFingerprinting.letterboxing" = false; + "privacy.clearOnShutdown.history" = false; + "privacy.clearOnShutdown.downloads" = true; + "privacy.clearOnShutdown.cookies" = false; + "security.OCSP.require" = false; + "browser.toolbars.bookmarks.visibility" = "always"; + "browser.startup.homepage" = "http://dashboard.lab/"; + }; + }; + + # enable librewolf as the default browser, with some extra config + xdg.mimeApps = { + enable = true; + defaultApplications = { + "x-scheme-handler/discord-409416265891971072" = ["discord-409416265891971072.desktop"]; + "x-scheme-handler/discord-402572971681644545" = ["discord-402572971681644545.desktop"]; + "x-scheme-handler/discord-696343075731144724" = ["discord-696343075731144724.desktop"]; + "x-scheme-handler/http" = ["librewolf.desktop"]; + "x-scheme-handler/https" = ["librewolf.desktop"]; + "x-scheme-handler/chrome" = ["librewolf.desktop"]; + "text/html" = ["librewolf.desktop"]; + "application/x-extension-htm" = ["librewolf.desktop"]; + "application/x-extension-html" = ["librewolf.desktop"]; + "application/x-extension-shtml" = ["librewolf.desktop"]; + "application/xhtml+xml" = ["librewolf.desktop"]; + "application/x-extension-xhtml" = ["librewolf.desktop"]; + "application/x-extension-xht" = ["librewolf.desktop"]; + }; + }; + } diff --git a/hosts/tsuki/home.nix b/hosts/tsuki/home.nix index ccb8200..acbf0ea 100755 --- a/hosts/tsuki/home.nix +++ b/hosts/tsuki/home.nix @@ -4,6 +4,7 @@ imports = [ ../../home + ../../home/librewolf ../../home/wezterm ../../home/zathura ../../home/gtk @@ -23,7 +24,6 @@ imports = [ username = "notoh"; homeDirectory = "/home/notoh"; packages = with pkgs; [ - firefox chromium bitwarden discord