{ ... }: { services.matrix-synapse = { enable = true; withJemalloc = true; dataDir = "/data/synapse"; settings = { listeners = [ { port = 8008; bind_addresses = [ "0.0.0.0" ]; type = "http"; tls = false; x_forwarded = true; resources = [ { names = [ "client" "federation" ]; compress = true; } ]; } { type = "http"; path = "/run/matrix-synapse/main-http.sock"; mode = "666"; resources = [ { names = [ "client" "federation" ]; compress = false; } ]; } ]; server_name = "allthe.gay"; enable_registration = true; registration_requires_token = true; allow_device_name_lookup_over_federation = true; registration_shared_secret = "dingus"; dyanmic_thumbnails = true; presence = { enable = true; update_interval = 60; }; url_preview_enabled = true; database = { name = "psycopg2"; args = { user = "matrix-synapse"; password = "somepassword"; database = "matrix-synapse"; host = "127.0.0.1"; application_name = "matrix-synapse (allthe.gay)"; cp_min = 5; cp_max = 50; #cp_reconnect_interval = "True"; }; }; max_image_pixels = "100M"; report_stats = false; user_directory = { enabled = true; search_all_users = true; prefer_local_users = true; }; # https://github.com/element-hq/synapse/blob/master/synapse/config/experimental.py experimental_features = { "msc2409_to_device_messages_enabled" = true; "msc2815_enabled" = true; # Redacted event content "msc3026_enabled" = true; # Busy presence "msc3202_transaction_extensions" = true; # appservice transaction extensions (device list/keys) "msc3266_enabled" = true; # Room summary API "msc3391_enabled" = true; # Remove account data "msc3823_account_suspension" = true; # Account suspension "msc3852_enabled" = true; # Last seen on /devices (CS-API/admin) "msc3874_enabled" = true; # filtering /messages with rel_types / not_rel_types "msc3890_enabled" = true; # communicate account data deletion to clients "msc3912_enabled" = true; # /messages with rel_types / not_rel_types and event id "msc3916_authenticated_media_enabled" = true; # Authenticated media "msc4069_profile_inhibit_propagation" = true; # Inhibit profile update propagation "msc4133_enabled" = true; # Custom profile fields "msc4151_enabled" = true; # Report room API (CS-API) "msc4210_enabled" = false; # Remove legacy mentions -- we want this *disabled* for moderation reasons "msc4222_enabled" = true; # state_after in sync }; }; }; }