nixos-config/modules/system/services/server/socialserver/matrix/synapse/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

2025-03-04 17:24:48 -05:00
{ config, lib, ... }:
{
2025-03-04 17:24:48 -05:00
imports = [ ./nginx ];
config = lib.mkIf config.system.socialserver.enable {
services.matrix-synapse = {
enable = true;
settings = {
2025-03-04 17:24:48 -05:00
server_name = "nixfox.ca";
public_baseurl = "https://matrix.nixfox.ca";
suppress_key_server_warning = true;
# Email notifications about account status
email = {
2025-02-25 03:03:43 -05:00
notif_from = "NixFox Matrix <noreply@nixfox.ca>";
smtp_host = "mx.nixfox.ca";
smtp_user = "noreply@nixfox.ca";
smtp_pass = config.secrets.noreplyPassword;
enable_tls = true;
smtp_port = 587;
require_transport_security = true;
};
# Disable registration without email
registrations_require_3pid = [ "email" ];
# Set the type of database
database.name = "sqlite3";
# Allow account registration
2025-02-25 03:03:43 -05:00
#enable_registration = true;
# General settings
2025-03-04 13:04:43 -05:00
max_upload_size = "60M";
burst_count = 15;
};
};
2025-02-25 03:03:43 -05:00
environment.persistence."/persist".directories = [ "/var/lib/matrix-synapse" ];
};
}