From 04eb40fad67b8fab1ff976415e2ae10cd9484c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 8 Mar 2023 16:03:30 +0200 Subject: [PATCH] vim-rs and synapse --- configuration.nix | 96 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index cb887e4..de9c41c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -130,6 +130,7 @@ in { ipset #ncdu sqlite + vimv-rs ripgrep binutils pciutils @@ -368,10 +369,103 @@ in { ''; }; + # TODO secrets: + # - registration_shared_secret + # - macaroon_secret_key + # - turn_shared_secret + # TODO: + # app_service_config_files + # signing_key_path + # settings.allow_device_name_lookup_over_federation = false; + # allow_profile_lookup_over_federation = false; + # email = { + # smtp_host = "127.0.0.1"; + # smtp_port = 25; + # notf_for_new_users = false; + # notif_from = "Jakstys %(app)s homeserver "; + # }; + # include_profile_data_on_invite = false; + # password_config.enabled = true; + # require_auth_for_profile_requests = true; + # thumbnail_sizes = [ + # { width = 32; height = 32; method = "crop"; } + # { width = 96; height = 96; method = "crop"; } + # { width = 320; height = 240; method = "scale"; } + # { width = 640; height = 480; method = "scale"; } + # { width = 800; height = 600; method = "scale"; } + # ]; + # user_directory = { + # enabled = true; + # search_all_users = false; + # prefer_local_users = true; + # }; + # + matrix-synapse = { + enable = false; + settings = { + server_name = "jakstys.lt"; + admin_contact = "motiejus@jakstys.lt"; + enable_registration = false; + report_stats = true; + signing_key_path = "/run/matrix-synapse/jakstys.lt.signing.key"; + log_config = lib.writeTextFile "log.config" '' + version: 1 + formatters: + precise: + format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s' + handlers: + console: + class: logging.StreamHandler + formatter: precise + loggers: + synapse.storage.SQL: + level: INFO + root: + level: INFO + handlers: [console] + disable_existing_loggers: false + ''; + public_baseurl = "https://jakstys.lt/"; + listeners = [{ + port = 8008; + bind_address = "127.0.0.1"; + type = "http"; + tls = false; + x_forwarded = true; + resources = [ + { type = "client"; compress = false; } + { type = "federation"; compress = false; } + ]; + }]; + database.name = "sqlite3"; + url_preview_enabled = false; + max_upload_size = "50M"; + turn_allow_guests = false; + turn_uris = [ + "turn:turn.jakstys.lt:3487?transport=udp" + "turn:turn.jakstys.lt:3487?transport=tcp" + "turns:turn.jakstys.lt:5349?transport=udp" + "turns:turn.jakstys.lt:5349?transport=tcp" + ]; + rc_messages_per_second = 0.2; + rc_message_burst_count = 10.0; + federation_rc_window_size = 1000; + federation_rc_sleep_limit = 10; + federation_rc_sleep_delay = 500; + federation_rc_reject_limit = 50; + federation_rc_concurrent = 3; + }; + }; + postfix = { enable = true; enableSmtp = true; - networks = [ "127.0.0.1/8" "[::ffff:127.0.0.0]/104" "[::1]/128" tailscale_subnet.cidr ]; + networks = [ + "127.0.0.1/8" + "[::ffff:127.0.0.0]/104" + "[::1]/128" + tailscale_subnet.cidr + ]; hostname = "hel1-a.jakstys.lt"; relayHost = "smtp.sendgrid.net"; relayPort = 587;