blob: 1a2b0e700cd1a3eedd71a79ba2e6d2593a719442 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{ config, lib, ... }:
let cfg = config.services.morty;
in {
services.nginx.virtualHosts."searx.aristote.fr".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;
};
}
|