From e07945d49cf867644b278f4c8d022743d7a9c29e Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Sun, 22 Oct 2023 02:33:40 +0200 Subject: [PATCH] bicep/matrix: enable sliding sync --- hosts/bicep/services/matrix/synapse.nix | 10 ++++++++++ secrets/bicep/matrix.yaml | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hosts/bicep/services/matrix/synapse.nix b/hosts/bicep/services/matrix/synapse.nix index f96aa96..1341dec 100644 --- a/hosts/bicep/services/matrix/synapse.nix +++ b/hosts/bicep/services/matrix/synapse.nix @@ -22,6 +22,11 @@ in { group = config.users.users.matrix-synapse.group; }; + sops.secrets."matrix/sliding-sync/env" = { + sopsFile = ../../../../secrets/bicep/matrix.yaml; + key = "sliding-sync/env"; + }; + services.matrix-synapse-next = { enable = true; @@ -38,6 +43,8 @@ in { workers.eventPersisters = 2; workers.useUserDirectoryWorker = true; + enableSlidingSync = true; + enableNginx = true; settings = { @@ -204,6 +211,9 @@ in { }; }; + services.matrix-synapse.sliding-sync.environmentFile = config.sops.secrets."matrix/sliding-sync/env".path; + + services.redis.servers."".enable = true; services.nginx.virtualHosts."matrix.pvv.ntnu.no" = lib.mkMerge [({ diff --git a/secrets/bicep/matrix.yaml b/secrets/bicep/matrix.yaml index 876357d..a675180 100644 --- a/secrets/bicep/matrix.yaml +++ b/secrets/bicep/matrix.yaml @@ -2,6 +2,8 @@ synapse: turnconfig: ENC[AES256_GCM,data:mASRjYa4C9WRow4x0XYRrlCE5LMJUYaId+o62r1qhsyJPa2LzrI=,iv:5vYdubvMDjLS6soiWx2DzkEAATb9NFbSS/Jhuuz1yI8=,tag:wOW07CQMDbOiZNervee/pg==,type:str] user_registration: ENC[AES256_GCM,data:ZDZfEEvyw8pg0WzhrdC8747ed+ZR2ZA8/WypJd/iDkmIy2RmxOeI0sE=,iv:l61mOlvzpCql4fC/eubBSU6px21et2WcpxQ6rFl14iw=,tag:sVDEAa3xipKIi/6isCjWew==,type:str] signing_key: ENC[AES256_GCM,data:6UpfiRlX9pRM7zhdm7Mc8y8EItLzugWkHSgE0tGpEmudCTa1wc60oNbYfhKDWU81DT/U148pZOoX1A==,iv:UlqCPicPm5eNBz1xBMI3A3Rn4t/GtldNIDdMH5MMnLw=,tag:HHaw6iMjEAv5b9mjHSVpwA==,type:str] +sliding-sync: + env: ENC[AES256_GCM,data:DsU1qKTy5sn06Y0S5kFUqZHML20n6HdHUdXsQRUw,iv:/TNTc+StAZbf6pBY9CeXdxkx8E+3bak/wOqHyBNMprU=,tag:er5u4FRlSmUZrOT/sj+RhQ==,type:str] coturn: static-auth-secret: ENC[AES256_GCM,data:y5cG/LyrorkDH+8YrgcV7DY=,iv:ca90q2J3+NOy51mUBy4TMKfYMgWL4hxWDdsKIuxRBgU=,tag:hpFCns1lpi07paHyGB7tGQ==,type:str] mjolnir: @@ -41,8 +43,8 @@ sops: cGxZVnFhdXRka2drTGdkVk1iM0pFL1kK2ry7b2cLYPfntWi/BV3K2O+mHt3242Ef sI2JLLQYHeAhxjFdCzP1RDR+Wu/pRxZje6xuTZ9I9TKNmm+LhAXHQw== -----END AGE ENCRYPTED FILE----- - lastmodified: "2023-09-15T04:40:21Z" - mac: ENC[AES256_GCM,data:ZJVHLbpSu/nIzl5FJfRdg2ymRN5M+zJXNUpi1hBt2MBmvK+1ed2ElhMe5x7pyasSDdaUtXDo7ghkUF7vE46Wo6Z9dvlAvhwWm7Y2AWfUe5SFVwzqlOCjSKRPFrQrL7PcDBtMj4twtwhc4XsfJoUSuigWW2m21BKtEZSuuxLRqLA=,iv:ufFbfMaNHydbkwq6lxN1dQJldkAbtqais/CZFkoDhb4=,tag:uMj0LaiU0obIlw/+HJJdKg==,type:str] + lastmodified: "2023-10-22T00:31:46Z" + mac: ENC[AES256_GCM,data:UpnaUfRxvdyzBy5x4EC3w5LQ1qWxILTQhpyVPd9whTzQMAivAHT0pVmP9aE4T9w3NcWTaghp+f70GmQXx/OCC6DsRCWtU9pFHRj12YUowM3yB5lVTOomOLZQ9m4gUXw5I2GZHWBJn8CyosDcBMlXz2tiR91v/8Ulh6sDSAO86U0=,iv:5GcgRvbpqDEslZruKHM/TcMaF52A5X7AK41DEbrsRIQ=,tag:ndDgCRyX1aDRnzEUNmpoMw==,type:str] pgp: - created_at: "2023-05-06T21:31:39Z" enc: |