mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 02:25:12 -05:00
refactor: cleaned up nixos and home dirs
This commit is contained in:
parent
824a91d405
commit
e596e1c1b3
582 changed files with 2 additions and 22 deletions
54
modules/home/gui/apps/browsers/firefox/config/search/default.nix
Executable file
54
modules/home/gui/apps/browsers/firefox/config/search/default.nix
Executable file
|
@ -0,0 +1,54 @@
|
|||
{ flake, ... }:
|
||||
let
|
||||
configPath = ./config;
|
||||
flakedPath = configPath + /flake;
|
||||
|
||||
regularSearchEngines =
|
||||
let
|
||||
files = builtins.attrNames (builtins.readDir configPath);
|
||||
in
|
||||
builtins.foldl' (
|
||||
emptySet: searchEngine: 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 (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 = [
|
||||
"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"
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue