1
0
Fork 0

wip: home proxy

This commit is contained in:
Daniel Kempkens 2023-04-09 00:37:43 +02:00
parent 893f33e7f9
commit 3f717f4b28
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
3 changed files with 19 additions and 0 deletions

Binary file not shown.

View file

@ -17,6 +17,8 @@ in
(import ../nixos/atticd.nix (args // { inherit secret; }))
(import ../nixos/home-proxy.nix (args // { inherit secret; }))
../nixos/tailscale.nix
];

View file

@ -0,0 +1,17 @@
{ 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 ];
}