From 98000d894eb1ad36e31d5d75696262083d95c80a Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Fri, 9 Jun 2023 23:10:53 -0400 Subject: [PATCH] fully disable synapse on matrix --- machines/matrix/configuration.nix | 78 +++++++++++++++---------------- machines/pendulum/matrix.nix | 1 + 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/machines/matrix/configuration.nix b/machines/matrix/configuration.nix index 3433c67..a9d0607 100644 --- a/machines/matrix/configuration.nix +++ b/machines/matrix/configuration.nix @@ -103,47 +103,47 @@ users.users.nathan = { extraGroups = [ "www-html" ]; }; # Configure matrix registration - services.matrix-synapse = { - settings = { - enable_registration_captcha = true; - allow_guest_access = false; - allow_public_rooms_over_federation = true; - experimental_features = { spaces_enabled = true; }; - auto_join_rooms = - [ "#space:community.rs" "#rules:community.rs" "#info:community.rs" ]; - turn_uris = [ - # "turn:turn.community.rs:3478?transport=udp" - # "turn:turn.community.rs:3478?transport=tcp" - ]; - # turn_user_lifetime = "1h"; - }; - extraConfigFiles = [ config.sops.secrets."matrix-secrets.yaml".path ]; - }; + # services.matrix-synapse = { + # settings = { + # enable_registration_captcha = true; + # allow_guest_access = false; + # allow_public_rooms_over_federation = true; + # experimental_features = { spaces_enabled = true; }; + # auto_join_rooms = + # [ "#space:community.rs" "#rules:community.rs" "#info:community.rs" ]; + # turn_uris = [ + # # "turn:turn.community.rs:3478?transport=udp" + # # "turn:turn.community.rs:3478?transport=tcp" + # ]; + # # turn_user_lifetime = "1h"; + # }; + # extraConfigFiles = [ config.sops.secrets."matrix-secrets.yaml".path ]; + # }; - # Install our utilties - environment.systemPackages = with pkgs; [ matrix-synapse-tools.synadm ]; + # # Install our utilties + # environment.systemPackages = with pkgs; [ matrix-synapse-tools.synadm ]; - # Setup a task to cleanup the database - systemd.services.synapse-db-cleanup = { - serviceConfig = { - Type = "oneshot"; - User = "postgres"; - Group = "postgres"; - }; - path = with pkgs; [ matrix-synapse-tools.rust-synapse-compress-state ]; - script = '' - synapse_auto_compressor -p "user=matrix-synapse password=synapse dbname=synapse host=localhost" -c 500 -n 100 - ''; - }; - systemd.timers.synapse-db-cleanup = { - wantedBy = [ "timers.target" ]; - partOf = [ "synapse-db-cleanup.service" ]; - timerConfig = { - # Weekly on sunday mornings - OnCalendar = "Sun, 5:00"; - Unit = "synapse-db-cleanup.service"; - }; - }; + # # Setup a task to cleanup the database + # systemd.services.synapse-db-cleanup = { + # serviceConfig = { + # Type = "oneshot"; + # User = "postgres"; + # Group = "postgres"; + # }; + # path = with pkgs; [ matrix-synapse-tools.rust-synapse-compress-state ]; + # script = '' + # synapse_auto_compressor -p "user=matrix-synapse password=synapse dbname=synapse host=localhost" -c 500 -n 100 + # ''; + # }; + # systemd.timers.synapse-db-cleanup = { + # wantedBy = [ "timers.target" ]; + # partOf = [ "synapse-db-cleanup.service" ]; + # timerConfig = { + # # Weekly on sunday mornings + # OnCalendar = "Sun, 5:00"; + # Unit = "synapse-db-cleanup.service"; + # }; + # }; # Configure the vhost for the domain services.nginx.virtualHosts = let diff --git a/machines/pendulum/matrix.nix b/machines/pendulum/matrix.nix index b80875a..7495d90 100644 --- a/machines/pendulum/matrix.nix +++ b/machines/pendulum/matrix.nix @@ -53,6 +53,7 @@ synapse_auto_compressor -p "user=matrix-synapse password=synapse dbname=synapse host=localhost" -c 500 -n 100 ''; }; + # Run the compressor systemd.timers.synapse-db-cleanup = { wantedBy = [ "timers.target" ]; partOf = [ "synapse-db-cleanup.service" ];