depot/hosts/VEGAS/services/matrix/federation.nix
Max 3f93dbadf1 VEGAS: add matrix service
Provides the following:
- Synapse homeserver
- Element web client
- Federation support
2022-01-14 22:49:38 +01:00

13 lines
429 B
Nix

{ config, pkgs, tools, ... }:
let
inherit (tools.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";
};
}