blob: 209c376fbb6b705e7cca156c3718cb7176fef613 (
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
|
{ config, lib, pkgs, ... }:
with config.krebs.lib;
let
hostname = config.krebs.build.host.name;
external-ip = head config.krebs.build.host.nets.internet.addrs4;
in {
services.redis.enable = true;
krebs.nginx = {
enable = mkDefault true;
servers = {
mybox-connector-one = {
listen = [ "${external-ip}:80" ];
server-names = [
"mycube.connector.one"
"mybox.connector.one"
];
locations = singleton (nameValuePair "/" ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8001/;
'');
};
};
};
}
|