31 lines
792 B
Nix
31 lines
792 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
serv = import ../config/services.nix;
|
|
serviceValidation = import ../validation/service/continuwuity.nix;
|
|
|
|
serverName = serviceValidation.getServerName serv;
|
|
|
|
trustedServers = serviceValidation.getTrustedServers serv;
|
|
memoryMax = serviceValidation.getMemoryMax serv;
|
|
in
|
|
{
|
|
services.matrix-continuwuity = {
|
|
enable = true;
|
|
settings = {
|
|
global = {
|
|
server_name = serverName;
|
|
allow_registration = true;
|
|
allow_encryption = true;
|
|
allow_federation = true;
|
|
max_request_size = 20 * 1024 * 1024; # 20 MiB
|
|
trusted_servers = trustedServers;
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd.services.matrix-continuwuity.serviceConfig =
|
|
lib.optionalAttrs (memoryMax != null) {
|
|
MemoryMax = memoryMax;
|
|
};
|
|
}
|