1
0
Fork 0
dotfiles/system/nixos/home-proxy.nix
2023-04-09 00:37:43 +02:00

17 lines
414 B
Nix

{ pkgs, config, secret, ... }:
{
services.nginx.streamConfig = ''
upstream home {
resolver 1.1.1.1 ipv6=off;
server ${secret.nginx.upstream.home.hostname}:${secret.nginx.upstream.home.port};
}
server {
listen ${secret.nginx.upstream.home.port};
proxy_pass home;
}
'';
networking.firewall.interfaces."enp1s0".allowedTCPPorts = [ secret.nginx.upstream.home.port ];
}