split custom search-engine configuration into seperate file
This commit is contained in:
parent
f0430a5815
commit
9a1ab7e65a
2 changed files with 104 additions and 97 deletions
|
@ -1,10 +1,12 @@
|
||||||
{
|
{
|
||||||
inputs,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
imports = [
|
||||||
|
./search-engines.nix
|
||||||
|
];
|
||||||
xdg.configFile."tridactyl/tridactylrc" = {
|
xdg.configFile."tridactyl/tridactylrc" = {
|
||||||
text = ''
|
text = ''
|
||||||
unbind <C-e>
|
unbind <C-e>
|
||||||
|
@ -46,102 +48,6 @@
|
||||||
meta = {};
|
meta = {};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
bookmarks = {};
|
|
||||||
search = {
|
|
||||||
force = true;
|
|
||||||
default = "Brave";
|
|
||||||
order = [
|
|
||||||
"Brave"
|
|
||||||
"Google"
|
|
||||||
"DuckDuckGo"
|
|
||||||
];
|
|
||||||
engines = let
|
|
||||||
inherit (lib.attrsets) attrsToList;
|
|
||||||
inherit (lib.lists) singleton;
|
|
||||||
in {
|
|
||||||
"Home Manager" = {
|
|
||||||
urls = singleton {
|
|
||||||
template = "https://home-manager-options.extranix.com";
|
|
||||||
params = attrsToList {
|
|
||||||
query = "{searchTerms}";
|
|
||||||
release = "master";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
iconUpdateURL = "https://home-manager-options.extranix.com/images/favicon.png";
|
|
||||||
definedAliases = ["@hm"];
|
|
||||||
};
|
|
||||||
"Nix Packages" = {
|
|
||||||
urls = singleton {
|
|
||||||
template = "https://search.nixos.org/packages";
|
|
||||||
params = attrsToList {
|
|
||||||
query = "{searchTerms}";
|
|
||||||
channel = "unstable";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
||||||
definedAliases = ["@np"];
|
|
||||||
};
|
|
||||||
"NixOS Options" = {
|
|
||||||
urls = singleton {
|
|
||||||
template = "https://search.nixos.org/options";
|
|
||||||
params = attrsToList {
|
|
||||||
query = "{searchTerms}";
|
|
||||||
channel = "unstable";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
||||||
definedAliases = ["@no"];
|
|
||||||
};
|
|
||||||
"GitHub" = {
|
|
||||||
urls = singleton {
|
|
||||||
template = "https://github.com/search";
|
|
||||||
params = attrsToList {
|
|
||||||
q = "{searchTerms}";
|
|
||||||
type = "code";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
iconUpdateURL = "https://github.githubassets.com/favicons/favicon-dark.svg";
|
|
||||||
definedAliases = ["@gh"];
|
|
||||||
};
|
|
||||||
"GitHub Repos" = {
|
|
||||||
urls = singleton {
|
|
||||||
template = "https://github.com/search";
|
|
||||||
params = attrsToList {
|
|
||||||
q = "{searchTerms}";
|
|
||||||
type = "repositories";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
iconUpdateURL = "https://github.githubassets.com/favicons/favicon-dark.svg";
|
|
||||||
definedAliases = ["@ghr"];
|
|
||||||
};
|
|
||||||
"GitHub Nix" = {
|
|
||||||
urls = singleton {
|
|
||||||
template = "https://github.com/search";
|
|
||||||
params = attrsToList {
|
|
||||||
"q" = "lang:nix {searchTerms}";
|
|
||||||
"type" = "code";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
iconUpdateURL = "https://github.githubassets.com/favicons/favicon-dark.svg";
|
|
||||||
definedAliases = ["@ghn"];
|
|
||||||
};
|
|
||||||
"Brave" = {
|
|
||||||
urls = singleton {
|
|
||||||
template = "https://search.brave.com/search";
|
|
||||||
params = attrsToList {
|
|
||||||
"q" = "{searchTerms}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
iconUpdateURL = "https://brave.com/static-assets/images/brave-favicon.png";
|
|
||||||
definedAliases = ["@b"];
|
|
||||||
};
|
|
||||||
|
|
||||||
"Google".metaData.alias = "@go";
|
|
||||||
"DuckDuckGo".metaData.alias = "@ddg";
|
|
||||||
"Wikipedia".metaData.alias = "@wiki";
|
|
||||||
"Bing".metaData.hidden = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
userChrome = builtins.readFile ./userChrome.css;
|
userChrome = builtins.readFile ./userChrome.css;
|
||||||
settings = {
|
settings = {
|
||||||
"browser.display.use_system_colors" = true; # about:blank colour match colourscheme
|
"browser.display.use_system_colors" = true; # about:blank colour match colourscheme
|
||||||
|
|
101
home/programs/browsers/firefox/search-engines.nix
Normal file
101
home/programs/browsers/firefox/search-engines.nix
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.firefox.profiles.xun.search = let
|
||||||
|
inherit (lib) attrsToList singleton;
|
||||||
|
in {
|
||||||
|
force = true;
|
||||||
|
default = "Brave";
|
||||||
|
order = [
|
||||||
|
"Brave"
|
||||||
|
"Google"
|
||||||
|
"DuckDuckGo"
|
||||||
|
];
|
||||||
|
|
||||||
|
engines = {
|
||||||
|
"Home Manager" = {
|
||||||
|
urls = singleton {
|
||||||
|
template = "https://home-manager-options.extranix.com";
|
||||||
|
params = attrsToList {
|
||||||
|
query = "{searchTerms}";
|
||||||
|
release = "master";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
iconUpdateURL = "https://home-manager-options.extranix.com/images/favicon.png";
|
||||||
|
definedAliases = ["@hm"];
|
||||||
|
};
|
||||||
|
"Nix Packages" = {
|
||||||
|
urls = singleton {
|
||||||
|
template = "https://search.nixos.org/packages";
|
||||||
|
params = attrsToList {
|
||||||
|
query = "{searchTerms}";
|
||||||
|
channel = "unstable";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = ["@np"];
|
||||||
|
};
|
||||||
|
"NixOS Options" = {
|
||||||
|
urls = singleton {
|
||||||
|
template = "https://search.nixos.org/options";
|
||||||
|
params = attrsToList {
|
||||||
|
query = "{searchTerms}";
|
||||||
|
channel = "unstable";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = ["@no"];
|
||||||
|
};
|
||||||
|
"GitHub" = {
|
||||||
|
urls = singleton {
|
||||||
|
template = "https://github.com/search";
|
||||||
|
params = attrsToList {
|
||||||
|
q = "{searchTerms}";
|
||||||
|
type = "code";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
iconUpdateURL = "https://github.githubassets.com/favicons/favicon-dark.svg";
|
||||||
|
definedAliases = ["@gh"];
|
||||||
|
};
|
||||||
|
"GitHub Repos" = {
|
||||||
|
urls = singleton {
|
||||||
|
template = "https://github.com/search";
|
||||||
|
params = attrsToList {
|
||||||
|
q = "{searchTerms}";
|
||||||
|
type = "repositories";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
iconUpdateURL = "https://github.githubassets.com/favicons/favicon-dark.svg";
|
||||||
|
definedAliases = ["@ghr"];
|
||||||
|
};
|
||||||
|
"GitHub Nix" = {
|
||||||
|
urls = singleton {
|
||||||
|
template = "https://github.com/search";
|
||||||
|
params = attrsToList {
|
||||||
|
"q" = "lang:nix {searchTerms}";
|
||||||
|
"type" = "code";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
iconUpdateURL = "https://github.githubassets.com/favicons/favicon-dark.svg";
|
||||||
|
definedAliases = ["@ghn"];
|
||||||
|
};
|
||||||
|
"Brave" = {
|
||||||
|
urls = singleton {
|
||||||
|
template = "https://search.brave.com/search";
|
||||||
|
params = attrsToList {
|
||||||
|
"q" = "{searchTerms}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
iconUpdateURL = "https://brave.com/static-assets/images/brave-favicon.png";
|
||||||
|
definedAliases = ["@b"];
|
||||||
|
};
|
||||||
|
|
||||||
|
"Google".metaData.alias = "@go";
|
||||||
|
"DuckDuckGo".metaData.alias = "@ddg";
|
||||||
|
"Wikipedia".metaData.alias = "@wiki";
|
||||||
|
"Bing".metaData.hidden = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue