modules.services.searx: drop

This commit is contained in:
2025-12-18 21:32:16 +08:00
parent 403f4bf27f
commit ebc6307ca7
2 changed files with 2 additions and 36 deletions

View File

@@ -1,32 +0,0 @@
inputs:
{
options.nixos.services.searx = let inherit (inputs.lib) mkOption types; in mkOption
{
type = types.nullOr (types.submodule { options =
{
hostname = mkOption { type = types.nonEmptyStr; default = "search.chn.moe"; };
};});
default = null;
};
config = let inherit (inputs.config.nixos.services) searx; in inputs.lib.mkIf (searx != null)
{
services.searx =
{
enable = true;
settings.server = { port = 8081; bind_address = "127.0.0.1"; secret_key = "@SEARX_SECRET_KEY@"; };
environmentFile = inputs.config.nixos.system.sops.templates."searx.env".path;
};
nixos =
{
system.sops =
{
templates."searx.env".content = let inherit (inputs.config.nixos.system.sops) placeholder; in
''
SEARX_SECRET_KEY=${placeholder."searx/secret-key"}
'';
secrets."searx/secret-key" = {};
};
services.nginx.https.${searx.hostname}.location."/".proxy.upstream = "http://127.0.0.1:8081";
};
};
}