tfc-nixos/modules/searx.nix

34 lines
796 B
Nix

{ config, lib, pkgs, unstable, ... }:
let
dn = "search.tfcconnection.org";
in
with lib;
{
services = {
searx = {
enable = true;
settings = {
server.port = 8085;
server.bind_address = "0.0.0.0";
server.secret_key = "cc842bf5ef8c5c7ec04dd29e1f4815bc6ac6c0bcb806b5185d035331bcec58bf";
search.formats = [ "html" "json" ];
# engines = lib.singleton
# { name = "wolframalpha";
# shortcut = "wa";
# api_key = "@WOLFRAM_API_KEY@";
# engine = "wolframalpha_api";
# };
};
};
};
services.nginx.virtualHosts.${dn} = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:${toString config.services.searx.settings.server.port}";
};
}