diff --git a/lib/data/services.toml b/lib/data/services.toml index 48426751..1ffe3720 100644 --- a/lib/data/services.toml +++ b/lib/data/services.toml @@ -106,8 +106,6 @@ port = 6932 host = "marvin" extUrl = "auth.pyrox.dev" anubis = 8401 -be-port = 30101 -be-anubis = 30102 [redlib] diff --git a/systems/x86_64-linux/marvin/services/pocket-id.nix b/systems/x86_64-linux/marvin/services/pocket-id.nix index a2e4cfab..8b412a16 100644 --- a/systems/x86_64-linux/marvin/services/pocket-id.nix +++ b/systems/x86_64-linux/marvin/services/pocket-id.nix @@ -12,15 +12,13 @@ in enable = true; environmentFile = config.age.secrets.pocket-id-secrets.path; settings = { - PUBLIC_APP_URL = "https://auth.pyrox.dev"; + APP_URL = "https://${d.extUrl}"; TRUST_PROXY = true; UPDATE_CHECK_DISABLED = true; - BACKEND_PORT = 30101; PORT = d.port; - INTERNAL_BACKEND_URL = "http://localhost:30101"; # Frontend Config - PUBLIC_UI_CONFIG_DISABLED = true; + UI_CONFIG_DISABLED = true; APP_NAME = "dishNet Auth"; SESSION_DURATION = 120; EMAILS_VERIFIED = true; @@ -42,19 +40,12 @@ in group = "pocket-id"; }; services.anubis.instances = { - pocket-id-fe = { + pocket-id = { settings = { BIND = ":${toString d.anubis}"; POLICY_FNAME = "${pkgs.py.anubis-files}/policies/pocket-id.yaml"; TARGET = "http://localhost:${toString d.port}"; }; }; - pocket-id-be = { - settings = { - BIND = ":${toString d.be-anubis}"; - POLICY_FNAME = "${pkgs.py.anubis-files}/policies/pocket-id.yaml"; - TARGET = "http://localhost:${toString d.be-port}"; - }; - }; }; } diff --git a/systems/x86_64-linux/prefect/services/caddy.nix b/systems/x86_64-linux/prefect/services/caddy.nix index b90c7f1b..a56e2355 100644 --- a/systems/x86_64-linux/prefect/services/caddy.nix +++ b/systems/x86_64-linux/prefect/services/caddy.nix @@ -66,15 +66,7 @@ in # Authentication ${pns.pocket-id.extUrl} = { extraConfig = '' - reverse_proxy /api/* ${marvin}:${toString pns.pocket-id.be-port} { - header_up X-Real-IP {remote_host} - header_up X-Http-Version {http.request.proto} - } - reverse_proxy /.well-known/* ${marvin}:${toString pns.pocket-id.be-port} { - header_up X-Real-IP {remote_host} - header_up X-Http-Version {http.request.proto} - } - reverse_proxy /* ${marvin}:${toString pns.pocket-id.port} { + reverse_proxy / ${marvin}:${toString pns.pocket-id.anubis} { header_up X-Real-IP {remote_host} header_up X-Http-Version {http.request.proto} }