From c1991400e58666a0ccfa5545a129b672f08fc5f4 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Tue, 15 Oct 2024 12:29:51 +0400 Subject: [PATCH] browsers/firefox: add home-manager to search things --- modules/desktop/browsers/firefox/default.nix | 71 ++++++++++---------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/modules/desktop/browsers/firefox/default.nix b/modules/desktop/browsers/firefox/default.nix index 17d12069..ab063002 100644 --- a/modules/desktop/browsers/firefox/default.nix +++ b/modules/desktop/browsers/firefox/default.nix @@ -1,11 +1,5 @@ -{ - options, - config, - lib, - pkgs, - ... -}: let - cfg = config.modules.desktop.browsers.firefox; +{ options, config, lib, pkgs, ... }: +let cfg = config.modules.desktop.browsers.firefox; in { options.modules.desktop.browsers.firefox = { enable = lib.mkEnableOption false; @@ -38,34 +32,43 @@ in { search.force = true; search.engines = { "Nix Packages" = { - urls = [ - { - template = "https://search.nixos.org/packages?channel=unstable"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@nixpkgs"]; + urls = [{ + template = + "https://search.nixos.org/packages?channel=unstable"; + params = [{ + name = "query"; + value = "{searchTerms}"; + }]; + }]; + icon = + "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@nixpkgs" ]; }; "Nix Options" = { - definedAliases = ["@nixopts"]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - urls = [ - { - template = "https://search.nixos.org/options?channel=unstable"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; + definedAliases = [ "@nixopts" ]; + icon = + "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + urls = [{ + template = + "https://search.nixos.org/options?channel=unstable"; + params = [{ + name = "query"; + value = "{searchTerms}"; + }]; + }]; + }; + "Home Manager Options" = { + definedAliases = [ "@homemgropts" ]; + icon = + "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + urls = [{ + template = + "https://home-manager-options.extranix.com/release=master"; + params = [{ + name = "query"; + value = "{searchTerms}"; + }]; + }]; }; }; };