add searxng
All checks were successful
/ check (push) Successful in 20s

This commit is contained in:
Lzebulon 2025-08-06 23:11:05 +02:00
parent aea432d407
commit 9531dd40a8
Signed by: lzebulon
GPG key ID: D6CDAB8050CBBE7D
4 changed files with 31 additions and 0 deletions

View file

@ -4,6 +4,7 @@
./fail2ban.nix
./forgejo.nix
./forgejo-runner.nix
./searxng.nix
];
services.caddy = {

View file

@ -0,0 +1,29 @@
{config, ...}:
{
age.secrets = {
searxng-secret-key = {
file = ../../../../secrets/services/searxng.age;
owner = "searx";
};
};
services.searx = {
enable = true;
redisCreateLocally = true;
settings.server = {
port = 8888;
bind_address = "::1";
secret_key = config.age.secrets.searxng-secret-key.path;
};
};
services.caddy.virtualHosts."search.${config.networking.domain}" = {
extraConfig = ''
reverse_proxy localhost:${toString config.services.searx.settings.server.port}
'';
};
}