nixos-infra/services/searxng/network.nix
Rustam Efimov 1c8bc1d422
Some checks failed
Nix CI / build (push) Failing after 1m36s
feat(hosts/velarion): enable SearXNG
2026-04-12 18:06:42 +03:00

26 lines
449 B
Nix

{
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;
};
};
};
}