diff --git a/nix/configurations/vanadium/home/firefox.nix b/nix/configurations/vanadium/home/firefox.nix index c91b2222..95e9dbd6 100644 --- a/nix/configurations/vanadium/home/firefox.nix +++ b/nix/configurations/vanadium/home/firefox.nix @@ -8,103 +8,89 @@ in { programs.firefox = { enable = true; - policies = { - SearchEngines = { - Default = "leta"; - Remove = ["Google"]; - Add = [ - { - Name = "leta"; - Alias = "@lt"; - IconURL = "https://leta.mullvad.net/favicon.ico"; - URLTemplate = "https://leta.mullvad.net/search?q={searchTerms}&engine=brave"; - SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; - } + policies.SearchEngines.Add = [ + # Forges + { + Name = "GitHub"; + Alias = "@gh"; + IconURL = "https://github.com/favicon.ico"; + Description = "Your code yum yum"; + URLTemplate = "https://github.com/search?q={searchTerms}&type=repositories"; + } + { + Name = "GitHub (Code Search)"; + Alias = "@ghc"; + IconURL = "https://github.com/favicon.ico"; + Description = "Your code yum yum"; + URLTemplate = "https://github.com/search?q={searchTerms}&type=code"; + } + { + Name = "Codeberg"; + Alias = "@cb"; + IconURL = "https://codeberg.org/favicon.ico"; + Description = "Software development, but free!"; + URLTemplate = "https://codeberg.org/explore/repos?q={searchTerms}"; + } + { + Name = "?C"; + Alias = "@cc"; + IconURL = "https://git.confusedcompiler.org/favicon.ico"; + URLTemplate = "https://git.confusedcompiler.org/explore/repos?q={searchTerms}"; + } - # Forges - { - Name = "GitHub"; - Alias = "@gh"; - IconURL = "https://github.com/favicon.ico"; - Description = "Your code yum yum"; - URLTemplate = "https://github.com/search?q={searchTerms}&type=repositories"; - } - { - Name = "GitHub (Code Search)"; - Alias = "@ghc"; - IconURL = "https://github.com/favicon.ico"; - Description = "Your code yum yum"; - URLTemplate = "https://github.com/search?q={searchTerms}&type=code"; - } - { - Name = "Codeberg"; - Alias = "@cb"; - IconURL = "https://codeberg.org/favicon.ico"; - Description = "Software development, but free!"; - URLTemplate = "https://codeberg.org/explore/repos?q={searchTerms}"; - } - { - Name = "?C"; - Alias = "@cc"; - IconURL = "https://git.confusedcompiler.org/favicon.ico"; - URLTemplate = "https://git.confusedcompiler.org/explore/repos?q={searchTerms}"; - } + # Nix{,OS,pkgs} + { + Name = "NixOS Search (Package)"; + Alias = "@np"; + IconURL = "https://nixos.org/favicon.ico"; + Description = "Search in nixpkgs"; + URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; + } + { + Name = "NixOS Search (Options)"; + Alias = "@no"; + IconURL = "https://nixos.org/favicon.ico"; + Description = "Search in NixOS options"; + URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; + } - # Nix{,OS,pkgs} - { - Name = "NixOS Search (Package)"; - Alias = "@np"; - IconURL = "https://nixos.org/favicon.ico"; - Description = "Search in nixpkgs"; - URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; - } - { - Name = "NixOS Search (Options)"; - Alias = "@no"; - IconURL = "https://nixos.org/favicon.ico"; - Description = "Search in NixOS options"; - URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; - } + # Haskell + { + Name = "Flora"; + Alias = "@hs"; + IconURL = "https://flora.pm/static/icons/favicon-32x32.png"; + URLTemplate = "https://flora.pm/search?q={searchTerms}"; + } - # Haskell - { - Name = "Flora"; - Alias = "@hs"; - IconURL = "https://flora.pm/static/icons/favicon-32x32.png"; - URLTemplate = "https://flora.pm/search?q={searchTerms}"; - } + # Discourse + { + Name = "NixOS Discourse"; + Alias = "@nd"; + IconURL = "https://nixos.org/favicon.ico"; + URLTemplate = "https://discourse.nixos.org/search?q={searchTerms}"; + } + { + Name = "Framework Discourse"; + Alias = "@fd"; + IconURL = "https://frame.work/favicon.ico"; + URLTemplate = "https://community.frame.work/search?q={searchTerms}"; + } - # Discourse - { - Name = "NixOS Discourse"; - Alias = "@nd"; - IconURL = "https://nixos.org/favicon.ico"; - URLTemplate = "https://discourse.nixos.org/search?q={searchTerms}"; - } - { - Name = "Framework Discourse"; - Alias = "@fd"; - IconURL = "https://frame.work/favicon.ico"; - URLTemplate = "https://community.frame.work/search?q={searchTerms}"; - } - - # Misc - { - Name = "YouTube"; - Alias = "@yt"; - IconURL = "https://youtube.com/favicon.ico"; - SuggestURLTemplate = "http://suggestqueries.google.com/complete/search?q={searchTerms}&ds=yt"; - URLTemplate = "https://www.youtube.com/results?search_query={searchTerms}"; - } - { - Name = "Genius"; - Alias = "@geni"; - IconURL = "https://genius.com/favicon.ico"; - URLTemplate = "https://genius.com/search?q={searchTerms}"; - } - ]; - }; - }; + # Misc + { + Name = "YouTube"; + Alias = "@yt"; + IconURL = "https://youtube.com/favicon.ico"; + SuggestURLTemplate = "http://suggestqueries.google.com/complete/search?q={searchTerms}&ds=yt"; + URLTemplate = "https://www.youtube.com/results?search_query={searchTerms}"; + } + { + Name = "Genius"; + Alias = "@geni"; + IconURL = "https://genius.com/favicon.ico"; + URLTemplate = "https://genius.com/search?q={searchTerms}"; + } + ]; profiles = { default = { diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index ed1c54f5..2f349d00 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -19,7 +19,24 @@ in { ]; SearchEngines = { - Remove = ["Bing" "DuckDuckGo" "Qwant" "eBay" "Perplexity"]; + Remove = ["Google" "Bing" "DuckDuckGo" "Qwant" "eBay" "Perplexity"]; + Default = "leta"; + Add = [ + { + Name = "leta"; + Alias = "@lt"; + IconURL = "https://leta.mullvad.net/favicon.ico"; + URLTemplate = "https://leta.mullvad.net/search?q={searchTerms}&engine=brave"; + SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; + } + { + Name = "leta"; + Alias = "@ltfr"; + IconURL = "https://leta.mullvad.net/favicon.ico"; + URLTemplate = "https://leta.mullvad.net/search?q={searchTerms}&engine=brave&language=fr"; + SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}"; + } + ]; }; NoDefaultBookmarks = true; DisplayMenuBar = "never";