blob: 46afcd8831435339f52aeb994c29f8c299841dcc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
{
config,
lib,
...
}:
let
cfg = {
searx = config.services.searx;
filtron = config.services.filtron;
};
in
{
imports = [
./searx
./filtron
];
services.nginx.virtualHosts.searx = lib.mkIf (cfg.searx.enable && cfg.filtron.enable) {
serverName = "searx.${config.networking.domain}";
locations = {
"/" = {
proxyPass = "http://${cfg.filtron.listen.address}:${toString cfg.filtron.listen.port}";
extraConfig = ''
proxy_set_header Connection $http_connection;
proxy_set_header X-Scheme $scheme;
# proxy_set_header X-Script-Name /;
'';
};
"/static/".alias = "${cfg.searx.package}/share/static/";
};
forceSSL = true;
enableACME = true;
};
systemd.services.uwsgi.personal.monitor = true;
}
|