mirror of
https://github.com/dali99/nixos-matrix-modules.git
synced 2025-09-10 04:53:48 +02:00
@@ -84,6 +84,8 @@ in
|
||||
description = "A yaml python logging config file";
|
||||
};
|
||||
|
||||
enableSlidingSync = mkEnableOption (lib.mdDoc "automatic Sliding Sync setup at `slidingsync.<domain>`");
|
||||
|
||||
settings = mkOption {
|
||||
type = types.submodule {
|
||||
freeformType = format.type;
|
||||
@@ -394,5 +396,19 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.matrix-synapse-next.settings.extra_well_known_client_content."org.matrix.msc3575.proxy" = mkIf cfg.enableSlidingSync {
|
||||
url = "https://${config.services.matrix-synapse.sliding-sync.publicBaseUrl}";
|
||||
};
|
||||
services.matrix-synapse.sliding-sync = mkIf cfg.enableSlidingSync {
|
||||
enable = true;
|
||||
enableNginx = lib.mkDefault cfg.enableNginx;
|
||||
publicBaseUrl = lib.mkDefault "slidingsync.${cfg.settings.server_name}";
|
||||
|
||||
settings = {
|
||||
SYNCV3_SERVER = lib.mkDefault "https://${cfg.public_baseurl}";
|
||||
SYNCV3_PROM = lib.mkIf cfg.settings.enable_metrics (lib.mkDefault "127.0.0.1:9001");
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -230,6 +230,9 @@ in
|
||||
locations."/_synapse/client" = {
|
||||
proxyPass = "http://$synapse_backend";
|
||||
};
|
||||
locations."/.well-known/matrix" = {
|
||||
proxyPass = "http://$synapse_backend";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user