18 lines
522 B
Nix
18 lines
522 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.jalr.matrix;
|
|
in
|
|
lib.mkIf cfg.enable {
|
|
services.matrix-sliding-sync = {
|
|
enable = true;
|
|
settings = {
|
|
SYNCV3_SERVER = "https://${cfg.fqdn}";
|
|
SYNCV3_BINDADDR = "127.0.0.1:${toString cfg.sliding-sync.port}";
|
|
};
|
|
environmentFile = cfg.sliding-sync.secretFile;
|
|
};
|
|
services.nginx.virtualHosts."${cfg.fqdn}".locations."/_matrix/client/unstable/org.matrix.msc3575/sync" = {
|
|
proxyPass = "http://127.0.0.1:${toString cfg.sliding-sync.port}";
|
|
};
|
|
}
|