add searx

This commit is contained in:
2024-08-26 01:06:12 +05:30
parent 70da725d1d
commit b5df8b2074
3 changed files with 51 additions and 4 deletions

39
modules/nixos/searx.nix Normal file
View File

@ -0,0 +1,39 @@
{
pkgs,
lib,
...
}: {
services = {
searx = {
enable = true;
package = pkgs.searxng;
environmentFile = "/run/secrets/searx_secret_key";
settings = {
general = {
instance_name = "SearXNG";
};
server = {
bind_address = "0.0.0.0";
port = 3415;
base_url = "https://sx.tux.rs";
secret_key = "@secret_key@";
};
};
};
nginx = {
enable = lib.mkForce true;
virtualHosts = {
"sx.tux.rs" = {
forceSSL = true;
enableACME = true;
locations = {
"/" = {
proxyPass = "http://localhost:3415";
};
};
};
};
};
};
}