searx: Add service. WIP: use git version
This commit is contained in:
parent
7dc674f24f
commit
40d0b5f55c
64
hosts/architect/searx.nix
Normal file
64
hosts/architect/searx.nix
Normal file
@ -0,0 +1,64 @@
|
||||
{ mach-nix, lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
domain = "gugol.giugl.io";
|
||||
network = import ./network.nix;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
redis.servers."searx" = { enable = true; port = 4456; };
|
||||
searx = {
|
||||
enable = true;
|
||||
package = mach-nix.buildPythonPackage "https://github.com/searxng/searxng/commit/2cf1425e8bc5d3143b6e001e82a034a794e8a206https://github.com/searxng/searxng/commit/2cf1425e8bc5d3143b6e001e82a034a794e8a206";
|
||||
|
||||
environmentFile = /secrets/searx/env;
|
||||
settings = {
|
||||
server = {
|
||||
secret_key = "@SEARX_SECRET_KEY@";
|
||||
port = 4455;
|
||||
};
|
||||
|
||||
general = {
|
||||
instance_name = "Pepe's Gugol";
|
||||
contact_url = "mailto:gugol@depasquale.giugl.io";
|
||||
enable_metrics = false;
|
||||
};
|
||||
|
||||
search = {
|
||||
safe_search = 0;
|
||||
autocomplete = "duckduckgo";
|
||||
prefer_configured_language = false;
|
||||
};
|
||||
|
||||
ui = {
|
||||
infinite_scroll = true;
|
||||
};
|
||||
|
||||
redis.url = "127.0.0.1:${toString config.services.redis.servers."searx".port}";
|
||||
|
||||
engines = [
|
||||
{ name = "google"; disabled = false; }
|
||||
{ name = "bing"; disabled = false; }
|
||||
{ name = "qwant"; disabled = false; }
|
||||
{ name = "duckduckgo"; disabled = false; }
|
||||
{ name = "yahoo"; disabled = false; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nginx.virtualHosts.${domain} = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.searx.settings.server.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.extraHosts = ''
|
||||
${network.architect-lan} ${domain}
|
||||
${network.architect-wg} ${domain}
|
||||
${network.architect-ts} ${domain}
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user