Infini-DL360/searx: init
This commit is contained in:
parent
a6c5b85a2c
commit
cb5f7483fc
6 changed files with 113 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
./jellyfin.nix
|
||||
./jupyter.nix
|
||||
./postgresql.nix
|
||||
./searx.nix
|
||||
./ssh.nix
|
||||
./thelounge.nix
|
||||
./vaultwarden.nix
|
||||
|
|
49
hosts/Infini-DL360/searx.nix
Normal file
49
hosts/Infini-DL360/searx.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ config, common, ... }:
|
||||
let
|
||||
cfg = config.services.searx;
|
||||
domain = common.subdomain "search";
|
||||
in
|
||||
{
|
||||
services.searx = {
|
||||
enable = true;
|
||||
runInUwsgi = true;
|
||||
redisCreateLocally = true;
|
||||
environmentFile = config.secrets."searx";
|
||||
uwsgiConfig = {
|
||||
disable-logging = true;
|
||||
socket = "/run/searx/searx.sock";
|
||||
chmod-socket = "660";
|
||||
};
|
||||
settings = {
|
||||
general = {
|
||||
instance_name = domain;
|
||||
};
|
||||
server = {
|
||||
secret_key = "@SECRET_KEY@";
|
||||
base_url = "https://${domain}";
|
||||
default_locale = "en";
|
||||
default_theme = "oscar";
|
||||
};
|
||||
outgoing = {
|
||||
useragent_suffix = "admin+search@inx.moe";
|
||||
};
|
||||
engines = [
|
||||
{
|
||||
name = "wolframalpha";
|
||||
disabled = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
users.users.nginx.extraGroups = [ "searx" ];
|
||||
|
||||
services.nginx.virtualHosts.${domain} = common.nginx.ssl // {
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
include ${config.services.nginx.package}/conf/uwsgi_params;
|
||||
uwsgi_pass unix://${cfg.uwsgiConfig.socket};
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -84,4 +84,10 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.uwsgi = {
|
||||
enable = true;
|
||||
plugins = [ "python3" ];
|
||||
instance.type = "emperor";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue