mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 01:55:13 -05:00
feat: added searXNG to Ceres
This commit is contained in:
parent
b71055ab4f
commit
95171965e6
2 changed files with 152 additions and 148 deletions
|
@ -11,6 +11,7 @@ in
|
||||||
syncthing
|
syncthing
|
||||||
ollama
|
ollama
|
||||||
hypr
|
hypr
|
||||||
|
searx
|
||||||
wayland
|
wayland
|
||||||
xserver
|
xserver
|
||||||
;
|
;
|
||||||
|
|
|
@ -5,164 +5,167 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
inherit (flake.config.machines.devices) mars ceres;
|
||||||
inherit (flake.config.services.instances) searx web;
|
inherit (flake.config.services.instances) searx web;
|
||||||
service = searx;
|
service = searx;
|
||||||
|
hostname = config.networking.hostName;
|
||||||
localhost = web.localhost.address0;
|
localhost = web.localhost.address0;
|
||||||
host = "${service.subdomain}.${web.domains.url0}";
|
host = "${service.subdomain}.${web.domains.url0}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services = {
|
services =
|
||||||
searx = {
|
{
|
||||||
enable = true;
|
searx = {
|
||||||
redisCreateLocally = true;
|
enable = true;
|
||||||
uwsgiConfig = {
|
redisCreateLocally = true;
|
||||||
socket = "/run/searx/searx.sock";
|
uwsgiConfig = {
|
||||||
http = ":${builtins.toString service.ports.port0}";
|
socket = "/run/searx/searx.sock";
|
||||||
chmod-socket = "660";
|
http = ":${builtins.toString service.ports.port0}";
|
||||||
};
|
chmod-socket = "660";
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
debug = false;
|
|
||||||
instance_name = "SearXNG Instance";
|
|
||||||
donation_url = false;
|
|
||||||
contact_url = false;
|
|
||||||
privacypolicy_url = false;
|
|
||||||
enable_metrics = false;
|
|
||||||
};
|
};
|
||||||
|
settings = {
|
||||||
ui = {
|
general = {
|
||||||
static_use_hash = true;
|
debug = false;
|
||||||
default_locale = "en";
|
instance_name = "SearXNG Instance";
|
||||||
query_in_title = true;
|
donation_url = false;
|
||||||
infinite_scroll = true;
|
contact_url = false;
|
||||||
center_alignment = true;
|
privacypolicy_url = false;
|
||||||
default_theme = "simple";
|
enable_metrics = false;
|
||||||
theme_args.simple_style = "auto";
|
};
|
||||||
search_on_category_select = false;
|
ui = {
|
||||||
hotkeys = "vim";
|
static_use_hash = true;
|
||||||
};
|
default_locale = "en";
|
||||||
|
query_in_title = true;
|
||||||
search = {
|
infinite_scroll = true;
|
||||||
safe_search = 0;
|
center_alignment = true;
|
||||||
autocomplete_min = 2;
|
default_theme = "simple";
|
||||||
autocomplete = "duckduckgo";
|
theme_args.simple_style = "auto";
|
||||||
ban_time_on_fail = 5;
|
search_on_category_select = false;
|
||||||
max_ban_time_on_fail = 120;
|
hotkeys = "vim";
|
||||||
};
|
};
|
||||||
|
search = {
|
||||||
server = {
|
safe_search = 0;
|
||||||
base_url = host;
|
autocomplete_min = 2;
|
||||||
port = service.ports.port0;
|
autocomplete = "duckduckgo";
|
||||||
bind_address = localhost;
|
ban_time_on_fail = 5;
|
||||||
secret_key = config.sops.secrets.searx-key.path;
|
max_ban_time_on_fail = 120;
|
||||||
limiter = true;
|
};
|
||||||
public_instance = false;
|
server = {
|
||||||
image_proxy = true;
|
port = service.ports.port0;
|
||||||
method = "GET";
|
bind_address = localhost;
|
||||||
};
|
secret_key = config.sops.secrets.searx-key.path;
|
||||||
|
limiter = true;
|
||||||
engines = lib.mapAttrsToList (name: value: { inherit name; } // value) {
|
public_instance = false;
|
||||||
"duckduckgo".disabled = false;
|
image_proxy = true;
|
||||||
"brave".disabled = false;
|
method = "GET";
|
||||||
"bing".disabled = false;
|
} // (if hostname == ceres then { base_url = host; } else { });
|
||||||
"mojeek".disabled = true;
|
engines = lib.mapAttrsToList (name: value: { inherit name; } // value) {
|
||||||
"mwmbl".disabled = false;
|
"duckduckgo".disabled = false;
|
||||||
"mwmbl".weight = 0.4;
|
"brave".disabled = false;
|
||||||
"qwant".disabled = true;
|
"bing".disabled = false;
|
||||||
"crowdview".disabled = false;
|
"mojeek".disabled = true;
|
||||||
"crowdview".weight = 0.5;
|
"mwmbl".disabled = false;
|
||||||
"curlie".disabled = true;
|
"mwmbl".weight = 0.4;
|
||||||
"ddg definitions".disabled = false;
|
"qwant".disabled = true;
|
||||||
"ddg definitions".weight = 2;
|
"crowdview".disabled = false;
|
||||||
"wikibooks".disabled = false;
|
"crowdview".weight = 0.5;
|
||||||
"wikidata".disabled = false;
|
"curlie".disabled = true;
|
||||||
"wikiquote".disabled = true;
|
"ddg definitions".disabled = false;
|
||||||
"wikisource".disabled = true;
|
"ddg definitions".weight = 2;
|
||||||
"wikispecies".disabled = false;
|
"wikibooks".disabled = false;
|
||||||
"wikispecies".weight = 0.5;
|
"wikidata".disabled = false;
|
||||||
"wikiversity".disabled = false;
|
"wikiquote".disabled = true;
|
||||||
"wikiversity".weight = 0.5;
|
"wikisource".disabled = true;
|
||||||
"wikivoyage".disabled = false;
|
"wikispecies".disabled = false;
|
||||||
"wikivoyage".weight = 0.5;
|
"wikispecies".weight = 0.5;
|
||||||
"currency".disabled = true;
|
"wikiversity".disabled = false;
|
||||||
"dictzone".disabled = true;
|
"wikiversity".weight = 0.5;
|
||||||
"lingva".disabled = true;
|
"wikivoyage".disabled = false;
|
||||||
"bing images".disabled = false;
|
"wikivoyage".weight = 0.5;
|
||||||
"brave.images".disabled = false;
|
"currency".disabled = true;
|
||||||
"duckduckgo images".disabled = false;
|
"dictzone".disabled = true;
|
||||||
"google images".disabled = false;
|
"lingva".disabled = true;
|
||||||
"qwant images".disabled = true;
|
"bing images".disabled = false;
|
||||||
"1x".disabled = true;
|
"brave.images".disabled = false;
|
||||||
"artic".disabled = false;
|
"duckduckgo images".disabled = false;
|
||||||
"deviantart".disabled = false;
|
"google images".disabled = false;
|
||||||
"flickr".disabled = true;
|
"qwant images".disabled = true;
|
||||||
"imgur".disabled = false;
|
"1x".disabled = true;
|
||||||
"library of congress".disabled = false;
|
"artic".disabled = false;
|
||||||
"material icons".disabled = true;
|
"deviantart".disabled = false;
|
||||||
"material icons".weight = 0.2;
|
"flickr".disabled = true;
|
||||||
"openverse".disabled = false;
|
"imgur".disabled = false;
|
||||||
"pinterest".disabled = true;
|
"library of congress".disabled = false;
|
||||||
"svgrepo".disabled = false;
|
"material icons".disabled = true;
|
||||||
"unsplash".disabled = false;
|
"material icons".weight = 0.2;
|
||||||
"wallhaven".disabled = false;
|
"openverse".disabled = false;
|
||||||
"wikicommons.images".disabled = false;
|
"pinterest".disabled = true;
|
||||||
"yacy images".disabled = true;
|
"svgrepo".disabled = false;
|
||||||
"bing videos".disabled = false;
|
"unsplash".disabled = false;
|
||||||
"brave.videos".disabled = false;
|
"wallhaven".disabled = false;
|
||||||
"duckduckgo videos".disabled = true;
|
"wikicommons.images".disabled = false;
|
||||||
"google videos".disabled = false;
|
"yacy images".disabled = true;
|
||||||
"qwant videos".disabled = false;
|
"bing videos".disabled = false;
|
||||||
"dailymotion".disabled = true;
|
"brave.videos".disabled = false;
|
||||||
"google play movies".disabled = true;
|
"duckduckgo videos".disabled = true;
|
||||||
"invidious".disabled = true;
|
"google videos".disabled = false;
|
||||||
"odysee".disabled = true;
|
"qwant videos".disabled = false;
|
||||||
"peertube".disabled = false;
|
"dailymotion".disabled = true;
|
||||||
"piped".disabled = true;
|
"google play movies".disabled = true;
|
||||||
"rumble".disabled = false;
|
"invidious".disabled = true;
|
||||||
"sepiasearch".disabled = false;
|
"odysee".disabled = true;
|
||||||
"vimeo".disabled = false;
|
"peertube".disabled = false;
|
||||||
"youtube".disabled = false;
|
"piped".disabled = true;
|
||||||
"brave.news".disabled = true;
|
"rumble".disabled = false;
|
||||||
"google news".disabled = true;
|
"sepiasearch".disabled = false;
|
||||||
};
|
"vimeo".disabled = false;
|
||||||
|
"youtube".disabled = false;
|
||||||
outgoing = {
|
"brave.news".disabled = true;
|
||||||
request_timeout = 5.0;
|
"google news".disabled = true;
|
||||||
max_request_timeout = 15.0;
|
};
|
||||||
pool_connections = 100;
|
outgoing = {
|
||||||
pool_maxsize = 15;
|
request_timeout = 5.0;
|
||||||
enable_http2 = true;
|
max_request_timeout = 15.0;
|
||||||
};
|
pool_connections = 100;
|
||||||
|
pool_maxsize = 15;
|
||||||
enabled_plugins = [
|
enable_http2 = true;
|
||||||
"Basic Calculator"
|
};
|
||||||
"Hash plugin"
|
enabled_plugins = [
|
||||||
"Tor check plugin"
|
"Basic Calculator"
|
||||||
"Open Access DOI rewrite"
|
"Hash plugin"
|
||||||
"Hostnames plugin"
|
"Tor check plugin"
|
||||||
"Unit converter plugin"
|
"Open Access DOI rewrite"
|
||||||
"Tracker URL remover"
|
"Hostnames plugin"
|
||||||
];
|
"Unit converter plugin"
|
||||||
};
|
"Tracker URL remover"
|
||||||
};
|
];
|
||||||
caddy = {
|
|
||||||
virtualHosts = {
|
|
||||||
"${host}" = {
|
|
||||||
extraConfig = ''
|
|
||||||
redir /.well-known/carddav /remote.php/dav/ 301
|
|
||||||
redir /.well-known/caldav /remote.php/dav/ 301
|
|
||||||
|
|
||||||
reverse_proxy ${localhost}:${toString service.ports.port0}
|
|
||||||
|
|
||||||
tls ${service.ssl.cert} ${service.ssl.key}
|
|
||||||
|
|
||||||
encode zstd gzip
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
// (
|
||||||
|
if hostname == ceres then
|
||||||
|
{
|
||||||
|
caddy = {
|
||||||
|
virtualHosts = {
|
||||||
|
"${host}" = {
|
||||||
|
extraConfig = ''
|
||||||
|
redir /.well-known/carddav /remote.php/dav/ 301
|
||||||
|
redir /.well-known/caldav /remote.php/dav/ 301
|
||||||
|
|
||||||
|
reverse_proxy ${localhost}:${toString service.ports.port0}
|
||||||
|
|
||||||
|
tls ${service.ssl.cert} ${service.ssl.key}
|
||||||
|
|
||||||
|
encode zstd gzip
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ }
|
||||||
|
);
|
||||||
|
|
||||||
};
|
|
||||||
sops =
|
sops =
|
||||||
let
|
let
|
||||||
sopsPath = secret: {
|
sopsPath = secret: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue