feat(hosts/velarion): enable SearXNG
Some checks failed
Nix CI / build (push) Failing after 1m36s

This commit is contained in:
Rustam Efimov 2026-04-12 18:06:42 +03:00
parent 89c1059c9a
commit 1c8bc1d422
No known key found for this signature in database
7 changed files with 35 additions and 99 deletions

View file

@ -0,0 +1,26 @@
{
config,
lib,
...
}:
let
cfg = config.machine.searxng;
in
with lib;
mkIf enable {
networking.firewall = {
allowedTCPPorts = [ cfg.port ];
};
services.nginx.virtualHosts =
mkIf (cfg.domain != null) {
"${cfg.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://[::1]:${toString cfg.port}";
proxyWebsockets = true;
};
};
};
}