home/programs/browsers: add extra search engines for firefox
This commit is contained in:
parent
373ab1c398
commit
0ac23d83ea
1 changed files with 45 additions and 42 deletions
|
@ -1,9 +1,4 @@
|
||||||
{
|
{pkgs, ...}: let
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
betterfox = pkgs.fetchFromGitHub {
|
betterfox = pkgs.fetchFromGitHub {
|
||||||
owner = "yokoffing";
|
owner = "yokoffing";
|
||||||
repo = "betterfox";
|
repo = "betterfox";
|
||||||
|
@ -80,41 +75,6 @@ in {
|
||||||
search = {
|
search = {
|
||||||
default = "SearxNG";
|
default = "SearxNG";
|
||||||
engines = {
|
engines = {
|
||||||
"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" = {
|
|
||||||
urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}];
|
|
||||||
iconUpdateURL = "https://wiki.nixos.org/favicon.ico";
|
|
||||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
|
||||||
definedAliases = ["@nw"];
|
|
||||||
};
|
|
||||||
"Home Manager Options" = {
|
|
||||||
urls = [{template = "https://home-manager-options.extranix.com/?release=master&query={searchTerms}";}];
|
|
||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
||||||
definedAliases = ["@hm"];
|
|
||||||
};
|
|
||||||
"Arch Wiki" = {
|
|
||||||
urls = [{template = "https://wiki.archlinux.org/index.php?search={searchTerms}";}];
|
|
||||||
icon = "https://archlinux.org/favicon.ico";
|
|
||||||
definedAliases = ["@aw"];
|
|
||||||
};
|
|
||||||
"SearxNG" = {
|
"SearxNG" = {
|
||||||
urls = [
|
urls = [
|
||||||
{
|
{
|
||||||
|
@ -139,13 +99,56 @@ in {
|
||||||
"type" = "application/x-suggestions+json";
|
"type" = "application/x-suggestions+json";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
definedAliases = ["@sx"];
|
iconUpdateURL = "https://searx.tiekoetter.com/favicon.ico";
|
||||||
|
updateInterval = 24 * 60 * 60 * 1000;
|
||||||
|
definedAliases = ["@s"];
|
||||||
|
};
|
||||||
|
"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" = {
|
||||||
|
urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}];
|
||||||
|
iconUpdateURL = "https://wiki.nixos.org/favicon.ico";
|
||||||
|
updateInterval = 24 * 60 * 60 * 1000;
|
||||||
|
definedAliases = ["@nw"];
|
||||||
|
};
|
||||||
|
"NixOS Options" = {
|
||||||
|
urls = [{template = "https://search.nixos.org/options?channel=unstable&type=packages&query={searchTerms}";}];
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = ["@no"];
|
||||||
|
};
|
||||||
|
"Noogle" = {
|
||||||
|
urls = [{template = "https://noogle.dev/q?term={searchTerms}";}];
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = ["@ng"];
|
||||||
|
};
|
||||||
|
"Home Manager" = {
|
||||||
|
urls = [{template = "https://home-manager-options.extranix.com/?release=master&query={searchTerms}";}];
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = ["@hm"];
|
||||||
};
|
};
|
||||||
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# https://github.com/oddlama/nix-config/blob/main/users/myuser/graphical/firefox.nix#L53-L57
|
# https://github.com/oddlama/nix-config/blob/main/users/myuser/graphical/firefox.nix#L53-L57
|
||||||
extraConfig = builtins.concatStringsSep "\n" [
|
extraConfig = builtins.concatStringsSep "\n" [
|
||||||
|
(builtins.readFile "${betterfox}/user.js")
|
||||||
(builtins.readFile "${betterfox}/Securefox.js")
|
(builtins.readFile "${betterfox}/Securefox.js")
|
||||||
(builtins.readFile "${betterfox}/Fastfox.js")
|
(builtins.readFile "${betterfox}/Fastfox.js")
|
||||||
(builtins.readFile "${betterfox}/Peskyfox.js")
|
(builtins.readFile "${betterfox}/Peskyfox.js")
|
||||||
|
|
Loading…
Reference in a new issue