From e0c6a80533112d53d00ffea2f5796fe141afe8db Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Mon, 24 Nov 2025 13:38:58 +0100 Subject: [PATCH] setup firefox search engines --- modules/applications/firefox.nix | 42 +++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/modules/applications/firefox.nix b/modules/applications/firefox.nix index 38c2eb2..4d895e1 100644 --- a/modules/applications/firefox.nix +++ b/modules/applications/firefox.nix @@ -22,8 +22,48 @@ in id = 0; name = "profile_0"; isDefault = true; + search = { + default = "ddg"; + order = [ + "ddg" + "google" + ]; + engines = { + nix-packages = { + name = "Nix Packages"; + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@np" ]; + }; + + nixos-wiki = { + name = "NixOS Wiki"; + urls = [ { template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; } ]; + iconMapObj."16" = "https://wiki.nixos.org/favicon.ico"; + definedAliases = [ "@nw" ]; + }; + + bing.metaData.hidden = true; + google.metaData.alias = "@g"; + }; + }; settings = { - # TODO: add firefox settings of choice + }; }; };