2023-04-08 22:37:43 +00:00
|
|
|
{ pkgs, config, secret, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services.nginx.streamConfig = ''
|
2023-04-08 22:43:37 +00:00
|
|
|
resolver 1.1.1.1 ipv6=off;
|
|
|
|
|
2023-04-08 22:37:43 +00:00
|
|
|
server {
|
2023-04-08 22:46:29 +00:00
|
|
|
listen ${builtins.toString(secret.nginx.upstream.home.port)} proxy_protocol;
|
2023-04-08 23:32:04 +00:00
|
|
|
proxy_pass ${secret.nginx.upstream.home.hostname}:${builtins.toString(secret.nginx.upstream.home.port)};
|
2023-04-08 22:37:43 +00:00
|
|
|
}
|
|
|
|
'';
|
|
|
|
|
|
|
|
networking.firewall.interfaces."enp1s0".allowedTCPPorts = [ secret.nginx.upstream.home.port ];
|
|
|
|
}
|