From e2d037b1f1f709ad6d3e29741a2963669a471634 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Sun, 20 Oct 2024 19:10:02 +0200 Subject: [PATCH] home/programs/browsers: add librewolf --- home/programs/browsers/firefox.nix | 43 +++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/home/programs/browsers/firefox.nix b/home/programs/browsers/firefox.nix index 3db0779..1b95817 100644 --- a/home/programs/browsers/firefox.nix +++ b/home/programs/browsers/firefox.nix @@ -1,4 +1,5 @@ { + inputs, config, pkgs, ... @@ -10,6 +11,7 @@ hash = "sha256-hpkEO5BhMVtINQG8HN4xqfas/R6q5pYPZiFK8bilIDs="; }; in { + imports = [inputs.nur.hmModules.nur]; # https://github.com/jchv/nixos-config/blob/402c2e612529870544e3a96d5d0cc1a239d003a5/modules/users/john/librewolf.nix#L14-L15 home.file.".mozilla/firefox/profiles.ini".target = ".librewolf/profiles.ini"; home.file.".librewolf/nezia".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.mozilla/firefox/nezia"; @@ -23,7 +25,18 @@ in { }; profiles = { nezia = { + extensions = with config.nur.repos.rycee.firefox-addons; [ + ublock-origin + proton-pass + darkreader + stylus + sponsorblock + return-youtube-dislikes + ]; + settings = { + "browser.urlbar.suggest.searches" = true; + "browser.search.suggest.enabled" = true; "ui.key.menuAccessKeyFocuses" = false; "privacy.clearOnShutdown.cache" = false; "privacy.clearOnShutdown.cookies" = false; @@ -33,8 +46,10 @@ in { "privacy.clearOnShutdown.offlineApps" = false; "privacy.clearOnShutdown.sessions" = false; }; + # https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix search = { + default = "SearxNG"; engines = { "Nix Packages" = { urls = [ @@ -61,7 +76,7 @@ in { updateInterval = 24 * 60 * 60 * 1000; # every day definedAliases = ["@nw"]; }; - "Home Manager Option Search" = { + "Home Manager Options" = { urls = [{template = "https://home-manager-options.extranix.com/?release=master&query={searchTerms}";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = ["@hm"]; @@ -71,6 +86,32 @@ in { icon = "https://archlinux.org/favicon.ico"; definedAliases = ["@aw"]; }; + "SearxNG" = { + urls = [ + { + rels = ["results"]; + template = "https://searx.tiekoetter.com/search"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + { + rels = ["suggestions"]; + template = "https://searx.tiekoetter.com/autocompleter"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + "type" = "application/x-suggestions+json"; + } + ]; + definedAliases = ["@sx"]; + }; "Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias }; };