diff --git a/nixos/hosts/ingress-proxy/default.nix b/nixos/hosts/ingress-proxy/default.nix index 3e2f031..995f066 100644 --- a/nixos/hosts/ingress-proxy/default.nix +++ b/nixos/hosts/ingress-proxy/default.nix @@ -49,22 +49,25 @@ in { forceSSL = true; enableACME = true; - locations."=/.well-known/matrix/server" = { + locations."=/.well-known/matrix/server" = let alias = pkgs.writeText "well-known-matrix-server" builtins.toJSON { "m.server" = "mx.sapphic.engineer"; }; + in { + alias = "${alias}"; extraConfig = '' default_type application/json; ''; }; - locations."=/.well-known/matrix/client" = { + locations."=/.well-known/matrix/client" = let alias = pkgs.writeText "well-known-matrix-client" builtins.toJSON { "m.homeserver" = { base_url = "https://mx.sapphic.engineer"; }; }; - + in { + alias = "${alias}"; extraConfig = '' default_type application/json; add_header Access-Control-Allow-Origin "*";