Working search
This commit is contained in:
parent
f2adbd5897
commit
b1181ec4f2
3 changed files with 83 additions and 17 deletions
|
@ -9,28 +9,99 @@
|
|||
in {
|
||||
searx = {
|
||||
enable = true;
|
||||
environmentFile = config.age.secrets."searxngSecret.age".path;
|
||||
settings = let
|
||||
enginesByCategory = {
|
||||
general = {
|
||||
google = {};
|
||||
duckduckgo = {};
|
||||
};
|
||||
|
||||
settings = {
|
||||
"social media" = {
|
||||
tootfinder = {};
|
||||
"mastodon users" = {};
|
||||
"lemmy communities" = {};
|
||||
"lemmy comments" = {};
|
||||
"lemmy users" = {};
|
||||
"lemmy posts" = {};
|
||||
};
|
||||
|
||||
images = {
|
||||
"duckduckgo images" = {};
|
||||
"google images" = {};
|
||||
};
|
||||
|
||||
map.openstreetmap = {};
|
||||
|
||||
videos = {
|
||||
peertube = {};
|
||||
youtube = {};
|
||||
};
|
||||
|
||||
it = {
|
||||
github = {};
|
||||
askubuntu = {};
|
||||
superuser = {};
|
||||
stackoverflow = {};
|
||||
codeberg.disabled = false;
|
||||
"gitea.com".disabled = false;
|
||||
"git.federated.nexus" = {
|
||||
engine = "gitea";
|
||||
base_url = "https://git.federated.nexus";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
engines =
|
||||
builtins.foldl'
|
||||
(
|
||||
acc: category:
|
||||
acc
|
||||
// lib.mapAttrs' (name: val: {
|
||||
name = name;
|
||||
value = val // {categories = [category];};
|
||||
})
|
||||
enginesByCategory.${category}
|
||||
)
|
||||
{}
|
||||
(lib.attrNames enginesByCategory);
|
||||
in {
|
||||
general = {
|
||||
instance_name = "Federated Nexus Search";
|
||||
contact_url = "mailto:henry@henryhiles.com";
|
||||
};
|
||||
|
||||
search = {
|
||||
autocomplete = "duckduckgo";
|
||||
favicon_resolver = "duckduckgo";
|
||||
};
|
||||
|
||||
ui = {
|
||||
query_in_title = true;
|
||||
infinite_scroll = true;
|
||||
center_alignment = true;
|
||||
};
|
||||
|
||||
server = {
|
||||
base_url = "https://${domain}";
|
||||
|
||||
port = "8080";
|
||||
method = "GET";
|
||||
base_url = "https://${domain}";
|
||||
bind_address = "unix://${socket}";
|
||||
secret_key = "I don't use anything that requires a secret key.";
|
||||
};
|
||||
|
||||
engines = lib.mapAttrsToList (name: value: {inherit name;} // value) {
|
||||
"wikidata".disabled = true;
|
||||
plugins = {
|
||||
"searx.plugins.oa_doi_rewrite.SXNGPlugin".active = true;
|
||||
"searx.plugins.tracker_url_remover.SXNGPlugin".active = true;
|
||||
};
|
||||
|
||||
categories_as_tabs = builtins.listToAttrs (
|
||||
map (category: {
|
||||
name = category;
|
||||
value = {};
|
||||
}) (lib.attrNames enginesByCategory)
|
||||
);
|
||||
use_default_settings.engines.keep_only = lib.attrNames engines;
|
||||
engines = lib.mapAttrsToList (name: value: {inherit name;} // value) engines;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -138,9 +138,14 @@
|
|||
]));
|
||||
|
||||
SearchEngines = {
|
||||
Default = "DuckDuckGo";
|
||||
Default = "Federated Nexus Search";
|
||||
PreventInstalls = true;
|
||||
Add = [
|
||||
{
|
||||
Name = "Federated Nexus Search";
|
||||
URLTemplate = "https://search.federated.nexus/search?q={searchTerms}";
|
||||
IconURL = "https://federated.nexus/images/icon.svg";
|
||||
}
|
||||
{
|
||||
Name = "Nix Package Search";
|
||||
URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFZLUVVkUSB5a0NN
|
||||
bUFxRXJ6TnJlTTM5d1JJbG9DSjNNc1hLRWVTTDZNU21tMEVQNlhFCnpjeGtVRFo4
|
||||
WGNPaml5Ym00dXBlemVXaTdGSm9zVjNHZGVVMnE1WFpCQmMKLT4gT1QrLWdyZWFz
|
||||
ZSA3JTA5fTFTIC1KL3JuNwpRYndkeUhvMTF6VjdPTWpDbUNqaEZiYUd6aEdlZlNO
|
||||
dWtnVjYvMFRnWDBicWJDVTAzZXRPeVdnZVVxekFadlNFCmlsajgyeTgvU0hCMlh6
|
||||
ZU1yTXMKLS0tIC8yL3BMdUNXc3VIc0JCMDFlaTg1ZTRNR3FENEZ6ZjF4Ym5idHpu
|
||||
eitWaEkKgTzeyWefh3JvEbGyw4HTzj+IJplwk9uOuSnXyJhB3XbfChdQsNyQ92K0
|
||||
XQo4yefB1+QKXWYX2/gJNVcKAbhcs/EF+XI6qg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
Loading…
Add table
Add a link
Reference in a new issue