1
0
Fork 0
dotfiles/system/nixos/home-proxy.nix
2023-04-09 01:45:25 +02:00

14 lines
424 B
Nix

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