feat: added searXNG to Ceres

This commit is contained in:
Nick 2025-03-08 02:13:19 -06:00
parent b71055ab4f
commit 95171965e6
2 changed files with 152 additions and 148 deletions

View file

@ -11,6 +11,7 @@ in
syncthing
ollama
hypr
searx
wayland
xserver
;

View file

@ -5,13 +5,16 @@
...
}:
let
inherit (flake.config.machines.devices) mars ceres;
inherit (flake.config.services.instances) searx web;
service = searx;
hostname = config.networking.hostName;
localhost = web.localhost.address0;
host = "${service.subdomain}.${web.domains.url0}";
in
{
services = {
services =
{
searx = {
enable = true;
redisCreateLocally = true;
@ -29,7 +32,6 @@ in
privacypolicy_url = false;
enable_metrics = false;
};
ui = {
static_use_hash = true;
default_locale = "en";
@ -41,7 +43,6 @@ in
search_on_category_select = false;
hotkeys = "vim";
};
search = {
safe_search = 0;
autocomplete_min = 2;
@ -49,9 +50,7 @@ in
ban_time_on_fail = 5;
max_ban_time_on_fail = 120;
};
server = {
base_url = host;
port = service.ports.port0;
bind_address = localhost;
secret_key = config.sops.secrets.searx-key.path;
@ -59,8 +58,7 @@ in
public_instance = false;
image_proxy = true;
method = "GET";
};
} // (if hostname == ceres then { base_url = host; } else { });
engines = lib.mapAttrsToList (name: value: { inherit name; } // value) {
"duckduckgo".disabled = false;
"brave".disabled = false;
@ -125,7 +123,6 @@ in
"brave.news".disabled = true;
"google news".disabled = true;
};
outgoing = {
request_timeout = 5.0;
max_request_timeout = 15.0;
@ -133,7 +130,6 @@ in
pool_maxsize = 15;
enable_http2 = true;
};
enabled_plugins = [
"Basic Calculator"
"Hash plugin"
@ -145,6 +141,10 @@ in
];
};
};
}
// (
if hostname == ceres then
{
caddy = {
virtualHosts = {
"${host}" = {
@ -161,8 +161,11 @@ in
};
};
};
}
else
{ }
);
};
sops =
let
sopsPath = secret: {