beagle: setup SearX(NG)
Some checks are pending
Flake check / check (push) Waiting to run
Update `flake.lock` / update_lockfile (push) Waiting to run

This commit is contained in:
Pedro Rey Anca 2025-12-27 14:17:24 +01:00
parent 6540e7e33f
commit cf5fbef43c
Signed by: peprolinbot
GPG key ID: 053EA6E00116533A
6 changed files with 37 additions and 24 deletions

View file

@ -2,6 +2,7 @@
imports = [
./modules/kanidm.nix
./modules/matrix.nix
./modules/searx.nix
./modules/reverse-proxy.nix
];
}

View file

@ -50,6 +50,15 @@
'';
};
};
"searx.peprolinbot.com" = {
forceSSL = true;
enableACME = true;
# Rest of configuration done in services.searx.configreNginx
};
};
};
}

View file

@ -0,0 +1,27 @@
{ config, ... }:
{
clan.core.vars.generators.searx = {
prompts.secret-key = {
description = "SearX server.secret_key";
type = "hidden";
};
files.environment-file.secret = true;
script = ''
cat <<EOL > $out/environment-file
SEARX_SECRET_KEY=$(<$prompts/secret-key)
EOL
'';
};
services.searx = {
enable = true;
domain = "searx.peprolinbot.com";
configureNginx = true;
redisCreateLocally = true;
environmentFile = config.clan.core.vars.generators.searx.files.environment-file.path;
settings = {
server.secret_key = "$SEARX_SECRET_KEY";
};
};
}