mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 10:05: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,13 +5,16 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
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 = {
|
searx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
redisCreateLocally = true;
|
redisCreateLocally = true;
|
||||||
|
@ -29,7 +32,6 @@ in
|
||||||
privacypolicy_url = false;
|
privacypolicy_url = false;
|
||||||
enable_metrics = false;
|
enable_metrics = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
ui = {
|
ui = {
|
||||||
static_use_hash = true;
|
static_use_hash = true;
|
||||||
default_locale = "en";
|
default_locale = "en";
|
||||||
|
@ -41,7 +43,6 @@ in
|
||||||
search_on_category_select = false;
|
search_on_category_select = false;
|
||||||
hotkeys = "vim";
|
hotkeys = "vim";
|
||||||
};
|
};
|
||||||
|
|
||||||
search = {
|
search = {
|
||||||
safe_search = 0;
|
safe_search = 0;
|
||||||
autocomplete_min = 2;
|
autocomplete_min = 2;
|
||||||
|
@ -49,9 +50,7 @@ in
|
||||||
ban_time_on_fail = 5;
|
ban_time_on_fail = 5;
|
||||||
max_ban_time_on_fail = 120;
|
max_ban_time_on_fail = 120;
|
||||||
};
|
};
|
||||||
|
|
||||||
server = {
|
server = {
|
||||||
base_url = host;
|
|
||||||
port = service.ports.port0;
|
port = service.ports.port0;
|
||||||
bind_address = localhost;
|
bind_address = localhost;
|
||||||
secret_key = config.sops.secrets.searx-key.path;
|
secret_key = config.sops.secrets.searx-key.path;
|
||||||
|
@ -59,8 +58,7 @@ in
|
||||||
public_instance = false;
|
public_instance = false;
|
||||||
image_proxy = true;
|
image_proxy = true;
|
||||||
method = "GET";
|
method = "GET";
|
||||||
};
|
} // (if hostname == ceres then { base_url = host; } else { });
|
||||||
|
|
||||||
engines = lib.mapAttrsToList (name: value: { inherit name; } // value) {
|
engines = lib.mapAttrsToList (name: value: { inherit name; } // value) {
|
||||||
"duckduckgo".disabled = false;
|
"duckduckgo".disabled = false;
|
||||||
"brave".disabled = false;
|
"brave".disabled = false;
|
||||||
|
@ -125,7 +123,6 @@ in
|
||||||
"brave.news".disabled = true;
|
"brave.news".disabled = true;
|
||||||
"google news".disabled = true;
|
"google news".disabled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
outgoing = {
|
outgoing = {
|
||||||
request_timeout = 5.0;
|
request_timeout = 5.0;
|
||||||
max_request_timeout = 15.0;
|
max_request_timeout = 15.0;
|
||||||
|
@ -133,7 +130,6 @@ in
|
||||||
pool_maxsize = 15;
|
pool_maxsize = 15;
|
||||||
enable_http2 = true;
|
enable_http2 = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
enabled_plugins = [
|
enabled_plugins = [
|
||||||
"Basic Calculator"
|
"Basic Calculator"
|
||||||
"Hash plugin"
|
"Hash plugin"
|
||||||
|
@ -145,6 +141,10 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
// (
|
||||||
|
if hostname == ceres then
|
||||||
|
{
|
||||||
caddy = {
|
caddy = {
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"${host}" = {
|
"${host}" = {
|
||||||
|
@ -161,8 +161,11 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ }
|
||||||
|
);
|
||||||
|
|
||||||
};
|
|
||||||
sops =
|
sops =
|
||||||
let
|
let
|
||||||
sopsPath = secret: {
|
sopsPath = secret: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue