refactor: complete overhaul
0
home-manager/modules/firefox/config/search/academic.nix → home-manager/modules/firefox/config/search/config/academic.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/development.nix → home-manager/modules/firefox/config/search/config/development.nix
Normal file → Executable file
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
0
home-manager/modules/firefox/config/search/gaming.nix → home-manager/modules/firefox/config/search/config/gaming.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/hidden.nix → home-manager/modules/firefox/config/search/config/hidden.nix
Normal file → Executable file
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 539 KiB After Width: | Height: | Size: 539 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 266 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 195 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 7 KiB After Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
0
home-manager/modules/firefox/config/search/icons/sb.png → home-manager/modules/firefox/config/search/config/icons/sb.png
Normal file → Executable file
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 357 KiB After Width: | Height: | Size: 357 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 436 KiB After Width: | Height: | Size: 436 KiB |
0
home-manager/modules/firefox/config/search/icons/xh.png → home-manager/modules/firefox/config/search/config/icons/xh.png
Normal file → Executable file
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
0
home-manager/modules/firefox/config/search/shopping.nix → home-manager/modules/firefox/config/search/config/shopping.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/socialMedia.nix → home-manager/modules/firefox/config/search/config/socialMedia.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/spank.nix → home-manager/modules/firefox/config/search/config/spank.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/tools.nix → home-manager/modules/firefox/config/search/config/tools.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/tracking.nix → home-manager/modules/firefox/config/search/config/tracking.nix
Normal file → Executable file
0
home-manager/modules/firefox/config/search/web.nix → home-manager/modules/firefox/config/search/config/web.nix
Normal file → Executable file
|
@ -1,31 +1,46 @@
|
|||
{flake, ...}: let
|
||||
aggregatedSearchEngines =
|
||||
configPath = ./config;
|
||||
flakedPath = configPath + "/flake";
|
||||
|
||||
regularSearchEngines = let
|
||||
files = builtins.attrNames (builtins.readDir configPath);
|
||||
in
|
||||
builtins.foldl' (
|
||||
emptySet: searchEngine:
|
||||
emptySet // (import ./${searchEngine}.nix)
|
||||
) {} [
|
||||
"academic"
|
||||
"development"
|
||||
"gaming"
|
||||
"hidden"
|
||||
"shopping"
|
||||
"socialMedia"
|
||||
"spank"
|
||||
"tools"
|
||||
"tracking"
|
||||
"web"
|
||||
]
|
||||
// builtins.foldl' (
|
||||
emptySet // (import (configPath + "/${searchEngine}"))
|
||||
) {} (builtins.filter (name: builtins.match ".*\\.nix$" name != null) files);
|
||||
|
||||
flakedSearchEngines = let
|
||||
files = builtins.attrNames (builtins.readDir flakedPath);
|
||||
in
|
||||
builtins.foldl' (
|
||||
emptySet: searchEngine:
|
||||
emptySet // (import ./${searchEngine}.nix {inherit flake;})
|
||||
) {} [
|
||||
"selfHosted"
|
||||
];
|
||||
emptySet // (import (flakedPath + "/${searchEngine}") {inherit flake;})
|
||||
) {} (builtins.filter (name: builtins.match ".*\\.nix$" name != null) files);
|
||||
|
||||
aggregatedSearchEngines = regularSearchEngines // flakedSearchEngines;
|
||||
in {
|
||||
search = {
|
||||
force = true;
|
||||
default = "Kagi";
|
||||
engines = aggregatedSearchEngines;
|
||||
order = import ./order.nix;
|
||||
order = [
|
||||
"AlternativeTo"
|
||||
"Core Radio"
|
||||
"Hackage"
|
||||
"Hoogle"
|
||||
"Jellyfin"
|
||||
"Kagi"
|
||||
"Nix Home Manager"
|
||||
"Nix Options"
|
||||
"Nix Packages"
|
||||
"Nix Wiki"
|
||||
"PeerTube"
|
||||
"Sci-Hub"
|
||||
"Torrent Leech"
|
||||
"Urban Dictionary"
|
||||
"Wikipedia"
|
||||
"YouTube"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
[
|
||||
# "1337x"
|
||||
"AlternativeTo"
|
||||
# "Amazon"
|
||||
# "Brave"
|
||||
"Core Radio"
|
||||
# "DNS Checker"
|
||||
# "Door Dash"
|
||||
# "FYT Supplies"
|
||||
"Hackage"
|
||||
"Hoogle"
|
||||
"Jellyfin"
|
||||
"Kagi"
|
||||
# "Kijiji"
|
||||
# "Memory Express"
|
||||
"Nix Home Manager"
|
||||
"Nix Options"
|
||||
"Nix Packages"
|
||||
"Nix Wiki"
|
||||
"PeerTube"
|
||||
# "Proton DB"
|
||||
# "Reddit"
|
||||
# "Rhyme Zone"
|
||||
"Sci-Hub"
|
||||
# "Skip The Dishes"
|
||||
# "Stanford Encyclopedia of Philosophy"
|
||||
# "Steam DB"
|
||||
# "The Pirate Bay"
|
||||
"Torrent Leech"
|
||||
"Urban Dictionary"
|
||||
# "VSTorrent"
|
||||
"Wikipedia"
|
||||
# "X"
|
||||
# "XVideos"
|
||||
"YouTube"
|
||||
]
|