home/firefox: use leta by default

This commit is contained in:
Primrose 2025-11-07 09:42:55 +08:00
parent 57e19055c4
commit e218086537
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
2 changed files with 97 additions and 94 deletions

View file

@ -8,103 +8,89 @@ in {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
policies = { policies.SearchEngines.Add = [
SearchEngines = { # Forges
Default = "leta"; {
Remove = ["Google"]; Name = "GitHub";
Add = [ Alias = "@gh";
{ IconURL = "https://github.com/favicon.ico";
Name = "leta"; Description = "Your code yum yum";
Alias = "@lt"; URLTemplate = "https://github.com/search?q={searchTerms}&type=repositories";
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 = "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 # Nix{,OS,pkgs}
{ {
Name = "GitHub"; Name = "NixOS Search (Package)";
Alias = "@gh"; Alias = "@np";
IconURL = "https://github.com/favicon.ico"; IconURL = "https://nixos.org/favicon.ico";
Description = "Your code yum yum"; Description = "Search in nixpkgs";
URLTemplate = "https://github.com/search?q={searchTerms}&type=repositories"; URLTemplate = "https://search.nixos.org/packages?query={searchTerms}";
} }
{ {
Name = "GitHub (Code Search)"; Name = "NixOS Search (Options)";
Alias = "@ghc"; Alias = "@no";
IconURL = "https://github.com/favicon.ico"; IconURL = "https://nixos.org/favicon.ico";
Description = "Your code yum yum"; Description = "Search in NixOS options";
URLTemplate = "https://github.com/search?q={searchTerms}&type=code"; URLTemplate = "https://search.nixos.org/options?query={searchTerms}";
} }
{
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} # Haskell
{ {
Name = "NixOS Search (Package)"; Name = "Flora";
Alias = "@np"; Alias = "@hs";
IconURL = "https://nixos.org/favicon.ico"; IconURL = "https://flora.pm/static/icons/favicon-32x32.png";
Description = "Search in nixpkgs"; URLTemplate = "https://flora.pm/search?q={searchTerms}";
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 # Discourse
{ {
Name = "Flora"; Name = "NixOS Discourse";
Alias = "@hs"; Alias = "@nd";
IconURL = "https://flora.pm/static/icons/favicon-32x32.png"; IconURL = "https://nixos.org/favicon.ico";
URLTemplate = "https://flora.pm/search?q={searchTerms}"; 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 # Misc
{ {
Name = "NixOS Discourse"; Name = "YouTube";
Alias = "@nd"; Alias = "@yt";
IconURL = "https://nixos.org/favicon.ico"; IconURL = "https://youtube.com/favicon.ico";
URLTemplate = "https://discourse.nixos.org/search?q={searchTerms}"; SuggestURLTemplate = "http://suggestqueries.google.com/complete/search?q={searchTerms}&ds=yt";
} URLTemplate = "https://www.youtube.com/results?search_query={searchTerms}";
{ }
Name = "Framework Discourse"; {
Alias = "@fd"; Name = "Genius";
IconURL = "https://frame.work/favicon.ico"; Alias = "@geni";
URLTemplate = "https://community.frame.work/search?q={searchTerms}"; 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 = { profiles = {
default = { default = {

View file

@ -19,7 +19,24 @@ in {
]; ];
SearchEngines = { 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; NoDefaultBookmarks = true;
DisplayMenuBar = "never"; DisplayMenuBar = "never";