initial commit, after deletion :)

This commit is contained in:
toufic ar 2026-01-07 06:25:07 +02:00
commit 9ec37597b3
Signed by: toufic ar
SSH key fingerprint: SHA256:/NaO5I1nG3gYKzrzSiTYIdRyaIYxDWfr1U+d+yfJ/4k
20 changed files with 1006 additions and 0 deletions

95
config/search/default.nix Normal file
View file

@ -0,0 +1,95 @@
{config, ...}: let
searxDomain = "search.${config.customOps.domain}";
in {
imports = [./engines.nix];
sops.secrets.searx.owner = "searx";
services.searx = {
enable = true;
redisCreateLocally = true;
limiterSettings = {
real_ip = {
x_for = 1;
ipv4_prefix = 32;
ipv6_prefix = 56;
};
botdetection = {
ip_limit = {
filter_link_local = true;
link_token = true;
};
};
};
settings = {
general = {
debug = false;
instance_name = "${config.customOps.owner}'s search";
donation_url = false;
contact_url = false;
privacypolicy_url = false;
enable_metrics = false;
};
ui = {
static_use_hash = true;
default_locale = "en";
query_in_title = false;
infinite_scroll = true;
center_alignment = false;
default_theme = "simple";
theme_args.simple_style = "auto";
search_on_category_select = true;
hotkeys = "vim";
url_formatting = "full";
};
search = {
safe_search = 0;
autocomplete_min = 2;
autocomplete = "duckduckgo";
favicon_resolver = "";
ban_time_on_fail = 5;
max_ban_time_on_fail = 120;
};
server = {
base_url = "https://${searxDomain}";
port = 8888;
bind_address = "127.0.0.1";
secret_key = config.sops.secrets.searx.path;
limiter = true;
public_instance = true;
image_proxy = false;
method = "POST";
};
outgoing = {
request_timeout = 5.0;
max_request_timeout = 15.0;
pool_connections = 100;
pool_maxsize = 15;
enable_http2 = true;
};
enabled_plugins = [
"Basic Calculator"
"Hash plugin"
"Tor check plugin"
"Open Access DOI rewrite"
"Hostnames plugin"
"Unit converter plugin"
"Tracker URL remover"
];
};
};
services.nginx.virtualHosts.${searxDomain} = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:8888";
};
}