2015-12-14 18:36:06 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2016-10-20 18:54:38 +00:00
|
|
|
with import <stockholm/lib>;
|
2015-12-14 18:36:06 +00:00
|
|
|
let
|
|
|
|
hostname = config.krebs.build.host.name;
|
|
|
|
user = config.services.nginx.user;
|
|
|
|
group = config.services.nginx.group;
|
2016-04-08 01:53:34 +00:00
|
|
|
external-ip = config.krebs.build.host.nets.internet.ip4.addr;
|
|
|
|
internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr;
|
2015-12-14 18:36:06 +00:00
|
|
|
in {
|
|
|
|
krebs.nginx = {
|
|
|
|
enable = mkDefault true;
|
|
|
|
servers = {
|
|
|
|
euer-share = {
|
|
|
|
listen = [ ];
|
|
|
|
server-names = [ "share.euer.krebsco.de" ];
|
|
|
|
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:8000/;
|
|
|
|
'');
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|