diff --git a/hosts/nyx/include/proxy.nix b/hosts/nyx/include/proxy.nix index 860c225..a162d0d 100644 --- a/hosts/nyx/include/proxy.nix +++ b/hosts/nyx/include/proxy.nix @@ -1,5 +1,5 @@ -{ config, pkgs, ...}: { - services.nginx.virtualHosts."phantomthieves.net" = { +{ config, pkgs, ...}: let + meleteWithWebsockets = { locations."/" = { proxyPass = "https://melete.tempest.dev/"; extraConfig = '' @@ -10,41 +10,18 @@ forceSSL = true; enableACME = true; }; +in { - services.nginx.virtualHosts."forum.phantomthieves.net" = { - locations."/" = { - proxyPass = "https://melete.tempest.dev/"; - extraConfig = '' - proxy_set_header Host $host; - ''; - }; - forceSSL = true; - enableACME = true; - }; - services.nginx.virtualHosts."necronomicon.social" = { - locations."/" = { - proxyPass = "https://melete.tempest.dev/"; - extraConfig = '' - proxy_set_header Host $host; - ''; - proxyWebsockets = true; - }; - forceSSL = true; - enableACME = true; - }; + services.nginx.virtualHosts."phantomthieves.net" = meleteWithWebsockets; + services.nginx.virtualHosts."forum.phantomthieves.net" = meleteWithWebsockets; + services.nginx.virtualHosts."necronomicon.social" = meleteWithWebsockets; + services.nginx.virtualHosts."elk.tempest.dev" = meleteWithWebsockets; + services.nginx.virtualHosts."m.phantomthieves.net" = meleteWithWebsockets; + services.nginx.virtualHosts."social.25jinightcord.de" = meleteWithWebsockets; - services.nginx.virtualHosts."elk.tempest.dev" = { - locations."/" = { - proxyPass = "http://melete.tempest.local:5314"; - proxyWebsockets = true; - }; - forceSSL = true; - enableACME = true; - }; - - services.nginx.virtualHosts."m.phantomthieves.net" = { - locations."/" = { + services.nginx.virtualHosts."25jinightcord.de" = { + locations."/.well-known/" = { proxyPass = "https://melete.tempest.dev/"; extraConfig = '' proxy_set_header Host $host;