2024-10-15 17:46:44 -04:00
|
|
|
{ pkgs, config, ... }:
|
2024-10-09 03:36:08 -04:00
|
|
|
{
|
2024-10-07 11:42:34 -04:00
|
|
|
imports = [
|
|
|
|
./coturn
|
|
|
|
./slidingsync
|
2024-10-09 03:36:08 -04:00
|
|
|
./nginx
|
2024-10-07 11:42:34 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
services.matrix-synapse = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
2024-10-24 23:42:09 -04:00
|
|
|
server_name = "${config.domains.jim1}";
|
|
|
|
public_baseurl = "https://matrix.${config.domains.jim1}";
|
2024-10-07 11:42:34 -04:00
|
|
|
suppress_key_server_warning = true;
|
|
|
|
|
2024-11-02 17:19:40 -04:00
|
|
|
listeners = [
|
|
|
|
{
|
|
|
|
port = 8008;
|
|
|
|
bind_addresses = [ "::" "0.0.0.0" ];
|
|
|
|
resources = [ { compress = true; names = [ "client" "federation" ]; } ];
|
|
|
|
type = "http";
|
|
|
|
tls = false;
|
|
|
|
x_forwarded = true;
|
|
|
|
}
|
|
|
|
];
|
2024-10-07 11:42:34 -04:00
|
|
|
|
|
|
|
email = {
|
2024-10-24 23:42:09 -04:00
|
|
|
notif_from = "Jimbo's Matrix <noreply@${config.domains.jim1}>";
|
|
|
|
smtp_host = "mx.${config.domains.jim1}";
|
|
|
|
smtp_user = "noreply@${config.domains.jim1}";
|
2024-10-15 17:46:44 -04:00
|
|
|
smtp_pass = config.secrets.noreplyPassword;
|
2024-10-07 11:42:34 -04:00
|
|
|
enable_tls = true;
|
|
|
|
smtp_port = 587;
|
|
|
|
require_transport_security = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Disable registration without email
|
|
|
|
registrations_require_3pid = [ "email" ];
|
|
|
|
|
|
|
|
# Allow only this range of emails
|
2024-10-24 23:42:09 -04:00
|
|
|
allowed_local_3pids = [
|
|
|
|
{
|
|
|
|
medium = "email";
|
|
|
|
pattern = ''^[^@]+@jimbosfiles\.com$'';
|
|
|
|
}
|
|
|
|
{
|
|
|
|
medium = "email";
|
|
|
|
pattern = ''^[^@]+@nixfox\.ca$'';
|
|
|
|
}
|
|
|
|
{
|
|
|
|
medium = "email";
|
|
|
|
pattern = ''^[^@]+@freecorn1854\.win$'';
|
|
|
|
}
|
|
|
|
{
|
|
|
|
medium = "email";
|
|
|
|
pattern = ''^[^@]+@lunamoonlight\.xyz$'';
|
|
|
|
}
|
|
|
|
];
|
2024-10-07 11:42:34 -04:00
|
|
|
|
|
|
|
# Set the type of database
|
|
|
|
database.name = "sqlite3";
|
|
|
|
|
|
|
|
# Allow account registration
|
|
|
|
enable_registration = true;
|
|
|
|
|
|
|
|
# General settings
|
|
|
|
url_preview_enabled = true;
|
|
|
|
max_upload_size = "50M";
|
|
|
|
report_stats = false;
|
|
|
|
burst_count = 15;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|