fwminex: formatting

This commit is contained in:
Motiejus Jakštys 2024-08-03 18:00:16 +03:00
parent 117d65010b
commit 9b9b609a5f

View File

@ -178,24 +178,19 @@ in
metrics
}
'';
virtualHosts =
let
fwminex-vno1 = "127.0.0.1";
fwminex-jakst = "127.0.0.1";
in
{
virtualHosts = {
"www.11sync.net".extraConfig = "redir https://jakstys.lt/2024/11sync-shutdown/";
"11sync.net".extraConfig = "redir https://jakstys.lt/2024/11sync-shutdown/";
"vpn.jakstys.lt".extraConfig = ''reverse_proxy ${fwminex-vno1}:${toString myData.ports.headscale}'';
"vpn.jakstys.lt".extraConfig = ''reverse_proxy 127.0.0.1:${toString myData.ports.headscale}'';
"hass.jakstys.lt:80".extraConfig = ''
@denied not remote_ip ${myData.subnets.tailscale.cidr}
abort @denied
reverse_proxy ${fwminex-jakst}:${toString myData.ports.hass}
reverse_proxy 127.0.0.1:${toString myData.ports.hass}
'';
"grafana.jakstys.lt".extraConfig = ''
@denied not remote_ip ${myData.subnets.tailscale.cidr}
abort @denied
reverse_proxy ${fwminex-jakst}:${toString myData.ports.grafana}
reverse_proxy 127.0.0.1:${toString myData.ports.grafana}
tls {$CREDENTIALS_DIRECTORY}/grafana.jakstys.lt-cert.pem {$CREDENTIALS_DIRECTORY}/grafana.jakstys.lt-key.pem
'';
"bitwarden.jakstys.lt".extraConfig = ''
@ -214,7 +209,7 @@ in
X-Frame-Options "SAMEORIGIN"
}
reverse_proxy ${fwminex-jakst}:${toString myData.ports.vaultwarden} {
reverse_proxy 127.0.0.1:${toString myData.ports.vaultwarden} {
header_up X-Real-IP {remote_host}
}
'';