blob: 1920701bbf3ee2ed85eb33165083cea8e354061a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{ config, lib, ... }:
let cfg = config.services.morty;
in {
services.nginx.virtualHosts."searx.${config.networking.domain}".locations =
lib.mkIf cfg.enable {
"/morty/" = {
proxyPass = "http://127.0.0.1:${toString cfg.port}";
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header Connection $http_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
'';
};
};
services.morty = { enable = false; };
}
|