1
0

hosts/porter: add scholl service proxy

This commit is contained in:
clerie 2022-12-05 20:45:00 +01:00
parent 607fdde5fd
commit 91e6a42ea3

View File

@ -23,17 +23,31 @@
networking.nameservers = [ "46.38.255.230" "46.38.252.230" ]; networking.nameservers = [ "46.38.255.230" "46.38.252.230" ];
services.nginx.enable = true; services.nginx.enable = true;
services.nginx.virtualHosts = { services.nginx.virtualHosts.default = lib.mkForce {};
"chisel.clerie.de" = { services.nginx.virtualHosts."*.schule.clerie.de" = {
enableACME = true; locations."/" = {
addSSL = true; proxyPass = "http://schule.net.clerie.de";
locations."/" = {
proxyPass = "http://[::1]:3765";
proxyWebsockets = true;
};
}; };
}; };
services.sniproxy = {
enable = true;
config = ''
error_log {
filename /var/log/sniproxy/error.log
}
access_log {
filename /var/log/sniproxy/access.log
}
listen 443 {
proto tls
}
table {
^.*\.schule\.clerie\.de$ [2001:638:904:ffcb::d]
}
'';
};
clerie.nginx-port-forward = { clerie.nginx-port-forward = {
enable = true; enable = true;
tcpPorts."2022" = { tcpPorts."2022" = {
@ -43,7 +57,7 @@
}; };
services.chisel-server = { services.chisel-server = {
enable = true; enable = false;
host = "[::1]"; host = "[::1]";
port = 3765; port = 3765;
authfile = "/var/src/secrets/chisel/users.json"; authfile = "/var/src/secrets/chisel/users.json";