From 9659928515b0f319461abd9a645249f6dd07a753 Mon Sep 17 00:00:00 2001 From: niten Date: Tue, 12 Sep 2023 15:43:24 -0700 Subject: [PATCH] Define hostSecrets --- matrix-module.nix | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/matrix-module.nix b/matrix-module.nix index 8c7f717..58ea023 100644 --- a/matrix-module.nix +++ b/matrix-module.nix @@ -6,6 +6,8 @@ let hostname = config.instance.hostname; + hostSecrets = config.fudo.secrets.host-secrets."${hostname}"; + openIdConfig = pkgs.toJSON "matrix-openid.yaml" { oidc_providers = [{ idp_id = cfg.openid.provider; @@ -108,21 +110,6 @@ in { nginx = { enable = true; virtualHosts = { - "${cfg.server-name}" = let - mkWellKnown = data: '' - add_header Content-Type application/json; - add_header Access-Control-Allow-Origin *; - return 200 '${builtins.toJSON data}'; - ''; - in { - enableACME = true; - forceSSL = true; - locations."/.well-known/matrix/server".extraConfig = - mkWellKnown { "m.server" = "https://${cfg.hostname}:443"; }; - locations."/.well-known/matrix/client".extraConfig = mkWellKnown { - "m.homeserver".base_url = "https://${cfg.hostname}"; - }; - }; "${cfg.hostname}" = { enableACME = true; forceSSL = true;