Add Matrix sliding-sync service
This commit is contained in:
parent
0006377763
commit
2db35dfc54
6 changed files with 42 additions and 3 deletions
|
|
@ -21,6 +21,16 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
sliding-sync = {
|
||||
port = mkOption {
|
||||
description = "TCP port for synapse service.";
|
||||
type = port;
|
||||
};
|
||||
secretFile = mkOption {
|
||||
type = path;
|
||||
description = "Location of the file to set secret environment variables.";
|
||||
};
|
||||
};
|
||||
fqdn = mkOption {
|
||||
type = str;
|
||||
description = ''
|
||||
|
|
@ -82,6 +92,7 @@ in
|
|||
imports = [
|
||||
./mautrix-signal.nix
|
||||
./mautrix-whatsapp.nix
|
||||
./sliding-sync.nix
|
||||
./synapse.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
18
modules/matrix/sliding-sync.nix
Normal file
18
modules/matrix/sliding-sync.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ 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}";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue