From 9dde857047f17eb95ca5837df65732de334d14d3 Mon Sep 17 00:00:00 2001 From: Richie Cahill Date: Sat, 2 Nov 2024 22:29:32 -0400 Subject: [PATCH] created search_engines.nix and firefox dir --- users/richie/home/gui/default.nix | 2 +- .../gui/{firefox.nix => firefox/default.nix} | 76 ++----------------- .../home/gui/firefox/search_engines.nix | 65 ++++++++++++++++ 3 files changed, 72 insertions(+), 71 deletions(-) rename users/richie/home/gui/{firefox.nix => firefox/default.nix} (84%) create mode 100644 users/richie/home/gui/firefox/search_engines.nix diff --git a/users/richie/home/gui/default.nix b/users/richie/home/gui/default.nix index 5431ac8..851643a 100644 --- a/users/richie/home/gui/default.nix +++ b/users/richie/home/gui/default.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { imports = [ - ./firefox.nix + ./firefox ./vscode ]; diff --git a/users/richie/home/gui/firefox.nix b/users/richie/home/gui/firefox/default.nix similarity index 84% rename from users/richie/home/gui/firefox.nix rename to users/richie/home/gui/firefox/default.nix index 495bdc4..77c0512 100644 --- a/users/richie/home/gui/firefox.nix +++ b/users/richie/home/gui/firefox/default.nix @@ -1,9 +1,7 @@ +{ inputs, ... }: { - pkgs, - inputs, - ... -}: -{ + imports = [ ./search_engines.nix ]; + programs.firefox = { enable = true; profiles.richie = { @@ -17,71 +15,9 @@ ublock-origin ]; search = { - force = true; - default = "kagi"; - order = [ "kagi" "DuckDuckGo" "Google" ]; - }; - search.engines = { - "Nix Options" = { - urls = [ - { - template = "https://search.nixos.org/options"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "channel"; - value = "unstable"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@o" ]; - }; - "Nix Packages" = { - urls = [ - { - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "channel"; - value = "unstable"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@n" ]; - }; - "kagi" = { - urls = [ - { - template = "https://kagi.com/search?"; - params = [ - { - name = "q"; - value = "{searchTerms}"; - } - ]; - } - ]; - icon = ./kagi.png; - }; + force = true; + default = "kagi"; + order = [ "kagi" "DuckDuckGo" "Google" ]; }; settings = { # SECTION: FASTFOX diff --git a/users/richie/home/gui/firefox/search_engines.nix b/users/richie/home/gui/firefox/search_engines.nix new file mode 100644 index 0000000..9d7262f --- /dev/null +++ b/users/richie/home/gui/firefox/search_engines.nix @@ -0,0 +1,65 @@ +{ pkgs, ... }: +{ + programs.firefox.search.engines = { + "Nix Options" = { + urls = [ + { + template = "https://search.nixos.org/options"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "channel"; + value = "unstable"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@o" ]; + }; + "Nix Packages" = { + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "channel"; + value = "unstable"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@n" ]; + }; + "kagi" = { + urls = [ + { + template = "https://kagi.com/search?"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + icon = ./kagi.png; + }; + }; +}