depot/cluster/services/matrix/federation.nix

14 lines
433 B
Nix
Raw Normal View History

2023-08-31 01:55:45 +03:00
{ config, pkgs, depot, ... }:
let
2023-08-31 01:55:45 +03:00
inherit (depot.lib.meta) domain;
federation = pkgs.writeText "matrix-federation.json" (builtins.toJSON {
"m.server" = "matrix.${domain}:443";
});
in
{
services.nginx.virtualHosts."top-level.${domain}".locations = {
"= /.well-known/matrix/server".alias = federation;
inherit (config.services.nginx.virtualHosts."matrix.${domain}".locations) "= /.well-known/matrix/client";
};
}