summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-08-16 13:05:08 +0200
committerRory& <root@rory.gay>2025-08-16 13:05:13 +0200
commitb399203549cb50536dc4500f1273d9923df0882f (patch)
tree35ee2b4562850b5911920c68b5bee522b1f9e5d6
parentArc changes (diff)
downloadRory-Open-Architecture-b399203549cb50536dc4500f1273d9923df0882f.tar.xz
Some cleanup
-rw-r--r--flake.lock126
-rwxr-xr-xflake.nix45
-rw-r--r--host/Rory-nginx/configuration.nix1
-rw-r--r--host/Rory-nginx/services/matrix/root.nix2
-rwxr-xr-xhost/Rory-ovh/configuration.nix13
-rw-r--r--host/Rory-ovh/services/containers/draupnir-ansible/container.nix12
-rw-r--r--host/Rory-ovh/services/containers/draupnir-ansible/services/draupnir.nix3
-rwxr-xr-xhost/Rory-ovh/services/containers/draupnir-cme/container.nix12
-rwxr-xr-xhost/Rory-ovh/services/containers/draupnir-cme/services/draupnir.nix3
-rw-r--r--host/Rory-ovh/services/containers/draupnir-fedora/container.nix12
-rw-r--r--host/Rory-ovh/services/containers/draupnir-fedora/services/draupnir.nix3
-rwxr-xr-xhost/Rory-ovh/services/containers/syntest1/services/synapse/synapse-main.nix1
-rwxr-xr-xhost/Rory-ovh/services/matrix/draupnir.nix3
-rw-r--r--host/Rory-ovh/services/safensound.nix28
-rwxr-xr-xmodules/base-server.nix10
-rw-r--r--packages/overlays/matrix-synapse/patches/0001-Fast-auth-links.patch14
-rw-r--r--packages/overlays/matrix-synapse/patches/0002-Hotfix-ignore-rejected-events-in-delayed_events.patch6
-rw-r--r--packages/overlays/matrix-synapse/patches/0003-Add-too-much-logging-to-room-summary-over-federation.patch2
-rw-r--r--packages/overlays/matrix-synapse/patches/0004-Log-entire-room-if-accessibility-check-fails.patch2
-rw-r--r--packages/overlays/matrix-synapse/patches/0005-Log-policy-server-rejected-events.patch2
-rw-r--r--packages/overlays/matrix-synapse/patches/0006-Use-parse_boolean-for-unredacted-content.patch6
-rw-r--r--packages/overlays/matrix-synapse/patches/0007-Expose-tombstone-in-room-admin-api.patch16
-rw-r--r--packages/overlays/matrix-synapse/patches/0008-fix-Always-recheck-messages-pagination-data-if-a-bac.patch38
-rw-r--r--packages/overlays/matrix-synapse/patches/0009-Fix-pagination-with-large-gaps-of-rejected-events.patch10
-rw-r--r--packages/overlays/matrix-synapse/patches/0010-Fix-nix-flake.patch2
-rw-r--r--packages/overlays/matrix-synapse/patches/0011-Fix-gitignore-to-ignore-.venv.patch2
-rw-r--r--packages/overlays/matrix-synapse/patches/0012-Devenv-use-postgres-17.patch2
-rw-r--r--packages/overlays/matrix-synapse/patches/0013-RequestRatelimiter-expose-can_do_action.patch2
-rw-r--r--packages/overlays/matrix-synapse/patches/0014-Add-bulk-send-events-endpoint.patch10
29 files changed, 163 insertions, 225 deletions
diff --git a/flake.lock b/flake.lock

index 8c7d3ab..52e2bad 100644 --- a/flake.lock +++ b/flake.lock
@@ -132,11 +132,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1754864308, - "narHash": "sha256-MCn1K3WQOtPhGGxDsUelb3dofv5Ud4lYhDLZOjBAzn4=", + "lastModified": 1755270000, + "narHash": "sha256-OrbgiGWAlpiILF7hf/FQVrzNwwZn0UQOaTG0u7STN3w=", "owner": "famedly", "repo": "conduit", - "rev": "660dd9c2273b8dc29fe023e9714c7e858a9e8134", + "rev": "54916a25bf203253083bc61ed720b8a05434a164", "type": "gitlab" }, "original": { @@ -218,11 +218,11 @@ "draupnirSrc": { "flake": false, "locked": { - "lastModified": 1754916512, - "narHash": "sha256-3hgzVBr8FGci8AIxZrYazGuS4GHbE2b1RpPJx/TRUMU=", + "lastModified": 1755195606, + "narHash": "sha256-KO2jm9yD/LnJSY1dAbPQ2fJZhmrxWJHU+TIaZzK97bg=", "owner": "the-draupnir-project", "repo": "Draupnir", - "rev": "46e1054834103fdf9797573a1c11ec0ca4bdc86f", + "rev": "f1dad52288ff32a096cbd3ff5be110648574c51f", "type": "github" }, "original": { @@ -562,11 +562,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1754974548, - "narHash": "sha256-XMjUjKD/QRPcqUnmSDczSYdw46SilnG0+wkho654DFM=", + "lastModified": 1755313937, + "narHash": "sha256-pQb7bNcolxYGRiylUCrTddiF+qW2wsUiM9+eRIDUrVU=", "owner": "nix-community", "repo": "home-manager", - "rev": "27a26be51ff0162a8f67660239f9407dba68d7c5", + "rev": "2a749f4790a14f7168be67cdf6e548ef1c944e10", "type": "github" }, "original": { @@ -862,11 +862,11 @@ "lix": { "flake": false, "locked": { - "lastModified": 1754639322, - "narHash": "sha256-yQbFoOT/jes5WTUUIjXmWugIacvvXRZwUnZ4ctrdr0o=", - "rev": "52ef1181f0a4e2156227a5086ca9a99c43214515", + "lastModified": 1755297974, + "narHash": "sha256-80IwCHFYF7PPx7smN9u9YOOxLQ681EMgB3Z2XQsoExU=", + "rev": "86303ffb057e34847a2c77c1c445cee5558df09e", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/52ef1181f0a4e2156227a5086ca9a99c43214515.tar.gz?rev=52ef1181f0a4e2156227a5086ca9a99c43214515" + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/86303ffb057e34847a2c77c1c445cee5558df09e.tar.gz?rev=86303ffb057e34847a2c77c1c445cee5558df09e" }, "original": { "type": "tarball", @@ -899,11 +899,11 @@ "matrixSpecSrc": { "flake": false, "locked": { - "lastModified": 1754563519, - "narHash": "sha256-2Yr3g9aFDlupF9/9wRv3+BcJAFqoaof11VBGhOaCeN4=", + "lastModified": 1755191760, + "narHash": "sha256-/EWVarhZnXSj4V8idEA5um4/ZD/0XHyGwagCz/uO1oM=", "owner": "matrix-org", "repo": "matrix-spec", - "rev": "f6d50099596da822085b09f1c2936fe4cee85831", + "rev": "f97d2944ae06b2b4dec60de534e09358f570e032", "type": "github" }, "original": { @@ -933,11 +933,11 @@ "nhekoSrc": { "flake": false, "locked": { - "lastModified": 1754902161, - "narHash": "sha256-DvgJNnCmNRuhJUfxnKUocsKhyYtPCqSGcoz+gIOplow=", + "lastModified": 1755336566, + "narHash": "sha256-GaBCbxki/0Dt4EBfIRjMhEk47tmTiqJOOI03/sz9bkQ=", "owner": "Nheko-reborn", "repo": "nheko", - "rev": "2bc2dfb64c322038f4ba65f4cc52dac6c5bdec18", + "rev": "f59f77a21e60c80a0f37f23e2926992a1d3a8ddc", "type": "github" }, "original": { @@ -1040,11 +1040,11 @@ }, "nixpkgs-RoryNix": { "locked": { - "lastModified": 1754975461, - "narHash": "sha256-F/EzILKOWZ4UvCbj655MLAf2EfjbhFbz1iKrxaJxmuk=", + "lastModified": 1755338363, + "narHash": "sha256-P+c5MA5PDYoXT1fWP9rXDPOkLTGH1yMPEa4HY0xDZ4U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cca779286a4dfd33a04d11954829dfeca0904b79", + "rev": "fdf016ddbd0d7b37e55ddd83261a556982d4ef68", "type": "github" }, "original": { @@ -1056,11 +1056,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1754975461, - "narHash": "sha256-F/EzILKOWZ4UvCbj655MLAf2EfjbhFbz1iKrxaJxmuk=", + "lastModified": 1755338363, + "narHash": "sha256-P+c5MA5PDYoXT1fWP9rXDPOkLTGH1yMPEa4HY0xDZ4U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cca779286a4dfd33a04d11954829dfeca0904b79", + "rev": "fdf016ddbd0d7b37e55ddd83261a556982d4ef68", "type": "github" }, "original": { @@ -1070,6 +1070,38 @@ "type": "github" } }, + "nixpkgs-override-draupnir": { + "locked": { + "lastModified": 1755338363, + "narHash": "sha256-P+c5MA5PDYoXT1fWP9rXDPOkLTGH1yMPEa4HY0xDZ4U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fdf016ddbd0d7b37e55ddd83261a556982d4ef68", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-override-synapse": { + "locked": { + "lastModified": 1755024293, + "narHash": "sha256-O132J3QeAjdcONrCTnJZweJVUnLLr+q78P7+teFgPGI=", + "owner": "teutat3s", + "repo": "nixpkgs", + "rev": "df7d67cf28156b1efbdb035ac5e987ab8496b579", + "type": "github" + }, + "original": { + "owner": "teutat3s", + "ref": "matrix-synapse-1.136.0", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1724316499, @@ -1104,11 +1136,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1754767907, - "narHash": "sha256-8OnUzRQZkqtUol9vuUuQC30hzpMreKptNyET2T9lB6g=", + "lastModified": 1755274400, + "narHash": "sha256-rTInmnp/xYrfcMZyFMH3kc8oko5zYfxsowaLv1LVobY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c5f08b62ed75415439d48152c2a784e36909b1bc", + "rev": "ad7196ae55c295f53a7d1ec39e4a06d922f3b899", "type": "github" }, "original": { @@ -1232,11 +1264,11 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1754725699, - "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", + "lastModified": 1755186698, + "narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", + "rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c", "type": "github" }, "original": { @@ -1339,9 +1371,10 @@ "nixpkgs": "nixpkgs_8", "nixpkgs-RoryNix": "nixpkgs-RoryNix", "nixpkgs-master": "nixpkgs-master", + "nixpkgs-override-draupnir": "nixpkgs-override-draupnir", + "nixpkgs-override-synapse": "nixpkgs-override-synapse", "nixpkgs-stable": "nixpkgs-stable_3", "ooye": "ooye", - "safeNSound": "safeNSound", "sops-nix": "sops-nix", "synapseHttpAntispamSrc": "synapseHttpAntispamSrc" } @@ -1380,39 +1413,16 @@ "type": "github" } }, - "safeNSound": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1748987648, - "narHash": "sha256-v523tDanOoveoccin8eaPPIfOG12p9cCfhH9vbEr2Qg=", - "ref": "refs/heads/main", - "rev": "df4af1b6b14b9287da332b36ca23bc4ccddfe58f", - "revCount": 54, - "type": "git", - "url": "https://cgit.rory.gay/school/nodejs-final-assignment.git/" - }, - "original": { - "type": "git", - "url": "https://cgit.rory.gay/school/nodejs-final-assignment.git/" - } - }, "sops-nix": { "inputs": { "nixpkgs": "nixpkgs_10" }, "locked": { - "lastModified": 1754328224, - "narHash": "sha256-glPK8DF329/dXtosV7YSzRlF4n35WDjaVwdOMEoEXHA=", + "lastModified": 1754988908, + "narHash": "sha256-t+voe2961vCgrzPFtZxha0/kmFSHFobzF00sT8p9h0U=", "owner": "Mic92", "repo": "sops-nix", - "rev": "49021900e69812ba7ddb9e40f9170218a7eca9f4", + "rev": "3223c7a92724b5d804e9988c6b447a0d09017d48", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix
index aff54f2..8dfa93f 100755 --- a/flake.nix +++ b/flake.nix
@@ -14,17 +14,9 @@ inputs = { # Different nixpkgs versions - nixpkgs = { - url = "github:NixOS/nixpkgs/nixos-unstable"; - }; - - nixpkgs-stable = { - url = "github:NixOS/nixpkgs/nixos-25.05"; - }; - - nixpkgs-master = { - url = "github:NixOS/nixpkgs/master"; - }; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05"; + nixpkgs-master.url = "github:NixOS/nixpkgs/master"; nixpkgs-RoryNix = { #url = "github:NixOS/nixpkgs/nixos-23.05"; @@ -32,10 +24,9 @@ }; # Draupnir module/package - #nixpkgs-DraupnirPkg.url = "github:r-ryantm/nixpkgs/auto-update/draupnir"; - #nixpkgs-DraupnirPkg.url = "github:NixOS/nixpkgs/master"; - # nixpkgs-keydb.url = "github:NixOS/nixpkgs?rev=e0464e47880a69896f0fb1810f00e0de469f770a"; - #MatrixContentFilter.url = "git+file:/home/Rory/git/matrix/MatrixContentFilter?submodules=1"; + nixpkgs-override-synapse.url = "github:teutat3s/nixpkgs/matrix-synapse-1.136.0"; + nixpkgs-override-draupnir.url = "github:NixOS/nixpkgs/master"; + #nixpkgs-override-draupnir.url = "github:r-ryantm/nixpkgs/auto-update/draupnir"; # Base modules home-manager.url = "github:nix-community/home-manager/master"; @@ -108,14 +99,6 @@ inputs.hyprland.follows = "hyprland"; }; - safeNSound = { - url = "git+https://cgit.rory.gay/school/nodejs-final-assignment.git/"; - inputs = { - flake-utils.follows = "flake-utils"; - nixpkgs.follows = "nixpkgs"; - }; - }; - }; outputs = @@ -143,7 +126,6 @@ lix-module.nixosModules.default grapevine.nixosModules.default ooye.modules.default - safeNSound.nixosModules.default ( { pkgs, lib, ... }: @@ -156,7 +138,6 @@ nixpkgs.overlays = [ (final: prev: { matrix-synapse-unwrapped = self.packages.${pkgs.stdenv.hostPlatform.system}.matrix-synapse-unwrapped-patched; - draupnir = inputs.nixpkgs-master.legacyPackages.${pkgs.stdenv.hostPlatform.system}.draupnir; #draupnir = inputs.nixpkgs-DraupnirPkg.legacyPackages.${pkgs.stdenv.hostPlatform.system}.draupnir; matrix-synapse-plugins.synapse-http-antispam = prev.matrix-synapse-plugins.synapse-http-antispam.overrideAttrs (oldAttrs: { src = inputs.synapseHttpAntispamSrc; @@ -173,12 +154,13 @@ inherit grapevine; inherit conduit; #inherit nixpkgs-Draupnir; - inherit nixpkgs-DraupnirPkg; + #inherit nixpkgs-DraupnirPkg; inherit cgit-magenta; inherit (inputs) draupnirSrc; inherit (inputs) nixpkgs-master; matrix-synapse-unwrapped-patched = self.packages.x86_64-linux.matrix-synapse-unwrapped-patched; + draupnir = self.packages.x86_64-linux.draupnir; }; }; @@ -406,7 +388,6 @@ system: let pkgs = import nixpkgs { inherit system; }; - pkgs-master = import nixpkgs-master { inherit system; }; in { packages.nheko-git = ( @@ -428,7 +409,8 @@ #}); packages.redpanda-connect = (pkgs.callPackage ./packages/redpanda-connect/default.nix { }); - packages.matrix-synapse-unwrapped-patched = pkgs-master.matrix-synapse-unwrapped.overrideAttrs (oldAttrs: rec { + + packages.matrix-synapse-unwrapped-patched = (self.inputs.nixpkgs-override-synapse or self.inputs.nixpkgs-master).legacyPackages.${system}.matrix-synapse-unwrapped.overrideAttrs (oldAttrs: rec { patches = (if oldAttrs ? patches then oldAttrs.patches else [ ]) ++ pkgs.lib.map (path: ./packages/overlays/matrix-synapse/patches/${path}) (builtins.attrNames (builtins.readDir ./packages/overlays/matrix-synapse/patches)); @@ -437,12 +419,11 @@ inherit (oldAttrs) src; inherit patches; name = "${oldAttrs.pname}-${oldAttrs.version}"; - hash = "sha256-4J92s6cSgsEIYQpbU6OOLI/USIJX2Gc7UdEHgWQgmXc="; + hash = "sha256-GX4lVg6aPVlqFgSSGsUg3wi7bne9jVWPTVx8rO5SjL8="; }; }); - packages.matrix-synapse-patched = pkgs-master.matrix-synapse.override { - matrix-synapse-unwrapped = self.packages.${pkgs.stdenv.hostPlatform.system}.matrix-synapse-unwrapped-patched; - }; + + packages.draupnir = (self.inputs.nixpkgs-override-draupnir or self.inputs.nixpkgs-master).legacyPackages.${system}.draupnir; } ); } diff --git a/host/Rory-nginx/configuration.nix b/host/Rory-nginx/configuration.nix
index 9448569..85709d8 100644 --- a/host/Rory-nginx/configuration.nix +++ b/host/Rory-nginx/configuration.nix
@@ -5,7 +5,6 @@ grapevine, conduit, conduwuit, - nixpkgs-Draupnir, ... }: diff --git a/host/Rory-nginx/services/matrix/root.nix b/host/Rory-nginx/services/matrix/root.nix
index 5bb3915..22a9517 100644 --- a/host/Rory-nginx/services/matrix/root.nix +++ b/host/Rory-nginx/services/matrix/root.nix
@@ -5,7 +5,7 @@ ./synapse/synapse-main.nix ./coturn.nix ./matrix-appservice-discord.nix - ./draupnir.nix + #./draupnir.nix ./grapevine.nix # ./sliding-sync.nix # removed from nixpkgs, use synapse support instead ./ooye.nix diff --git a/host/Rory-ovh/configuration.nix b/host/Rory-ovh/configuration.nix
index cd3ac32..82be855 100755 --- a/host/Rory-ovh/configuration.nix +++ b/host/Rory-ovh/configuration.nix
@@ -1,10 +1,9 @@ { pkgs, lib, - nixpkgs-Draupnir, - nixpkgs-DraupnirPkg, nixpkgs-master, matrix-synapse-unwrapped-patched, + draupnir, ... }: @@ -25,7 +24,6 @@ ./services/matrix/draupnir.nix ./services/email/root.nix #./services/wireguard/wireguard.nix - ./services/safensound.nix ]; users.groups.ocp = { }; @@ -89,8 +87,7 @@ inherit pkgs lib - nixpkgs-Draupnir - nixpkgs-DraupnirPkg + draupnir ; }; @@ -98,8 +95,7 @@ inherit pkgs lib - nixpkgs-Draupnir - nixpkgs-DraupnirPkg + draupnir ; }; @@ -107,8 +103,7 @@ inherit pkgs lib - nixpkgs-Draupnir - nixpkgs-DraupnirPkg + draupnir ; }; diff --git a/host/Rory-ovh/services/containers/draupnir-ansible/container.nix b/host/Rory-ovh/services/containers/draupnir-ansible/container.nix
index ef35488..e7ca8e2 100644 --- a/host/Rory-ovh/services/containers/draupnir-ansible/container.nix +++ b/host/Rory-ovh/services/containers/draupnir-ansible/container.nix
@@ -1,6 +1,5 @@ { - # nixpkgs-Draupnir, - # nixpkgs-DraupnirPkg, + draupnir, ... }: @@ -8,8 +7,7 @@ privateNetwork = true; autoStart = true; specialArgs = { - # inherit nixpkgs-Draupnir; - # inherit nixpkgs-DraupnirPkg; + inherit draupnir; }; config = { lib, pkgs, ... }: @@ -18,13 +16,7 @@ ../shared.nix ./root.nix ./services/draupnir.nix - # "${nixpkgs-Draupnir}/nixos/modules/services/matrix/draupnir.nix" ]; - # nixpkgs.overlays = [ - # (final: prev: { - # draupnir = nixpkgs-DraupnirPkg.legacyPackages.${pkgs.stdenv.hostPlatform.system}.draupnir; - # }) - # ]; }; hostAddress = "192.168.100.1"; localAddress = "192.168.100.19"; diff --git a/host/Rory-ovh/services/containers/draupnir-ansible/services/draupnir.nix b/host/Rory-ovh/services/containers/draupnir-ansible/services/draupnir.nix
index c05b170..ef76500 100644 --- a/host/Rory-ovh/services/containers/draupnir-ansible/services/draupnir.nix +++ b/host/Rory-ovh/services/containers/draupnir-ansible/services/draupnir.nix
@@ -1,8 +1,9 @@ -{ ... }: +{ draupnir, ... }: { services.draupnir = { enable = true; + package = draupnir; secrets.accessToken = "/etc/draupnir-access-token"; settings = { diff --git a/host/Rory-ovh/services/containers/draupnir-cme/container.nix b/host/Rory-ovh/services/containers/draupnir-cme/container.nix
index 4b2d0da..e0b0351 100755 --- a/host/Rory-ovh/services/containers/draupnir-cme/container.nix +++ b/host/Rory-ovh/services/containers/draupnir-cme/container.nix
@@ -1,6 +1,5 @@ { - #nixpkgs-Draupnir, - #nixpkgs-DraupnirPkg, + draupnir, ... }: @@ -8,8 +7,7 @@ privateNetwork = true; autoStart = true; specialArgs = { - #inherit nixpkgs-Draupnir; - #inherit nixpkgs-DraupnirPkg; + inherit draupnir; }; config = { lib, pkgs, ... }: @@ -18,13 +16,7 @@ ../shared.nix ./root.nix ./services/draupnir.nix - #"${nixpkgs-Draupnir}/nixos/modules/services/matrix/draupnir.nix" ]; - # nixpkgs.overlays = [ - # (final: prev: { - # draupnir = nixpkgs-DraupnirPkg.legacyPackages.${pkgs.stdenv.hostPlatform.system}.draupnir; - # }) - # ]; }; hostAddress = "192.168.100.1"; localAddress = "192.168.100.17"; diff --git a/host/Rory-ovh/services/containers/draupnir-cme/services/draupnir.nix b/host/Rory-ovh/services/containers/draupnir-cme/services/draupnir.nix
index 4b3cd57..3f3ec92 100755 --- a/host/Rory-ovh/services/containers/draupnir-cme/services/draupnir.nix +++ b/host/Rory-ovh/services/containers/draupnir-cme/services/draupnir.nix
@@ -1,8 +1,9 @@ -{ ... }: +{ draupnir, ... }: { services.draupnir = { enable = true; + package = draupnir; secrets.accessToken = "/etc/draupnir-access-token"; settings = { diff --git a/host/Rory-ovh/services/containers/draupnir-fedora/container.nix b/host/Rory-ovh/services/containers/draupnir-fedora/container.nix
index fe4571e..e19fb68 100644 --- a/host/Rory-ovh/services/containers/draupnir-fedora/container.nix +++ b/host/Rory-ovh/services/containers/draupnir-fedora/container.nix
@@ -1,6 +1,5 @@ { - # nixpkgs-Draupnir, - # nixpkgs-DraupnirPkg, + draupnir, ... }: @@ -8,8 +7,7 @@ privateNetwork = true; autoStart = true; specialArgs = { - # inherit nixpkgs-Draupnir; - # inherit nixpkgs-DraupnirPkg; + inherit draupnir; }; config = { lib, pkgs, ... }: @@ -18,13 +16,7 @@ ../shared.nix ./root.nix ./services/draupnir.nix - # "${nixpkgs-Draupnir}/nixos/modules/services/matrix/draupnir.nix" ]; - # nixpkgs.overlays = [ - # (final: prev: { - # draupnir = nixpkgs-DraupnirPkg.legacyPackages.${pkgs.stdenv.hostPlatform.system}.draupnir; - # }) - # ]; }; hostAddress = "192.168.100.1"; localAddress = "192.168.100.18"; diff --git a/host/Rory-ovh/services/containers/draupnir-fedora/services/draupnir.nix b/host/Rory-ovh/services/containers/draupnir-fedora/services/draupnir.nix
index a39b3a9..0b74984 100644 --- a/host/Rory-ovh/services/containers/draupnir-fedora/services/draupnir.nix +++ b/host/Rory-ovh/services/containers/draupnir-fedora/services/draupnir.nix
@@ -1,8 +1,9 @@ -{ ... }: +{ draupnir, ... }: { services.draupnir = { enable = true; + package = draupnir; secrets.accessToken = "/etc/draupnir-access-token"; settings = { diff --git a/host/Rory-ovh/services/containers/syntest1/services/synapse/synapse-main.nix b/host/Rory-ovh/services/containers/syntest1/services/synapse/synapse-main.nix
index 327d648..e4d6075 100755 --- a/host/Rory-ovh/services/containers/syntest1/services/synapse/synapse-main.nix +++ b/host/Rory-ovh/services/containers/syntest1/services/synapse/synapse-main.nix
@@ -1,7 +1,6 @@ { config, pkgs, - matrix-synapse-patched, ... }: diff --git a/host/Rory-ovh/services/matrix/draupnir.nix b/host/Rory-ovh/services/matrix/draupnir.nix
index 3f6d89a..ac4ca6f 100755 --- a/host/Rory-ovh/services/matrix/draupnir.nix +++ b/host/Rory-ovh/services/matrix/draupnir.nix
@@ -1,9 +1,10 @@ -{ pkgs, draupnirSrc, ... }: +{ pkgs, draupnir, ... }: { services.draupnir = { enable = true; + package = draupnir; secrets.accessToken = "/data/secrets/draupnir-access-token"; settings = { diff --git a/host/Rory-ovh/services/safensound.nix b/host/Rory-ovh/services/safensound.nix deleted file mode 100644
index 69f301a..0000000 --- a/host/Rory-ovh/services/safensound.nix +++ /dev/null
@@ -1,28 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -{ - services.mongodb = { - enable = true; - package = pkgs.mongodb-ce; - enableAuth = true; - initialRootPasswordFile = "/etc/mongo-pass"; - #bind_ip = "/run/mongodb.sock"; - extraConfig = '' - net.unixDomainSocket.filePermissions: 0777 - ''; - }; - - services.safensound = { - enable = true; - dbCredentialsPath = "/data/secrets/safensound-mongodb"; - port = 7645; - logRequests = "-"; - logQueries = true; - logAuth = true; - }; -} diff --git a/modules/base-server.nix b/modules/base-server.nix
index ccf4a77..1278d83 100755 --- a/modules/base-server.nix +++ b/modules/base-server.nix
@@ -20,9 +20,11 @@ time.timeZone = lib.mkDefault "UTC"; systemd = { enableEmergencyMode = false; - watchdog = { - runtimeTime = "20s"; - rebootTime = "30s"; + settings = { + Manager = { + RuntimeWatchdogSec = "20s"; + RebootWatchdogSec = "30s"; + }; }; sleep.extraConfig = '' @@ -70,7 +72,7 @@ defaultGateway = lib.mkDefault "192.168.1.1"; }; - hardware.pulseaudio.enable = false; + services.pulseaudio.enable = false; # This shaves off half a gigabyte of disk space... hardware.enableAllFirmware = false; diff --git a/packages/overlays/matrix-synapse/patches/0001-Fast-auth-links.patch b/packages/overlays/matrix-synapse/patches/0001-Fast-auth-links.patch
index 9e3e1f1..7c5cf47 100644 --- a/packages/overlays/matrix-synapse/patches/0001-Fast-auth-links.patch +++ b/packages/overlays/matrix-synapse/patches/0001-Fast-auth-links.patch
@@ -1,4 +1,4 @@ -From 7ad0925b66afc3c43a607ec9df1ec8936d18f68f Mon Sep 17 00:00:00 2001 +From a4c542d11e60728426b85b8a59a7c02062930ede Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Tue, 22 Jul 2025 05:07:01 +0200 Subject: [PATCH 01/14] Fast auth links @@ -9,10 +9,10 @@ Subject: [PATCH 01/14] Fast auth links 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/synapse/storage/database.py b/synapse/storage/database.py -index 6188195614..79af139543 100644 +index f7aec16c96..fdc7572e97 100644 --- a/synapse/storage/database.py +++ b/synapse/storage/database.py -@@ -2558,6 +2558,49 @@ class DatabasePool: +@@ -2615,6 +2615,49 @@ class DatabasePool: return txn.fetchall() @@ -63,10 +63,10 @@ index 6188195614..79af139543 100644 def make_in_list_sql_clause( database_engine: BaseDatabaseEngine, diff --git a/synapse/storage/databases/main/event_federation.py b/synapse/storage/databases/main/event_federation.py -index 28d202ef0a..25997ee772 100644 +index 26a91109df..2244e47cf5 100644 --- a/synapse/storage/databases/main/event_federation.py +++ b/synapse/storage/databases/main/event_federation.py -@@ -52,6 +52,7 @@ from synapse.storage.database import ( +@@ -53,6 +53,7 @@ from synapse.storage.database import ( DatabasePool, LoggingDatabaseConnection, LoggingTransaction, @@ -74,7 +74,7 @@ index 28d202ef0a..25997ee772 100644 ) from synapse.storage.databases.main.cache import CacheInvalidationWorkerStore from synapse.storage.databases.main.events_worker import EventsWorkerStore -@@ -382,8 +383,7 @@ class EventFederationWorkerStore( +@@ -386,8 +387,7 @@ class EventFederationWorkerStore( sql = """ WITH RECURSIVE links(chain_id) AS ( SELECT @@ -84,7 +84,7 @@ index 28d202ef0a..25997ee772 100644 UNION SELECT target_chain_id -@@ -400,8 +400,8 @@ class EventFederationWorkerStore( +@@ -404,8 +404,8 @@ class EventFederationWorkerStore( while chains_to_fetch: batch2 = tuple(itertools.islice(chains_to_fetch, 1000)) chains_to_fetch.difference_update(batch2) diff --git a/packages/overlays/matrix-synapse/patches/0002-Hotfix-ignore-rejected-events-in-delayed_events.patch b/packages/overlays/matrix-synapse/patches/0002-Hotfix-ignore-rejected-events-in-delayed_events.patch
index 6a43260..568c3ec 100644 --- a/packages/overlays/matrix-synapse/patches/0002-Hotfix-ignore-rejected-events-in-delayed_events.patch +++ b/packages/overlays/matrix-synapse/patches/0002-Hotfix-ignore-rejected-events-in-delayed_events.patch
@@ -1,4 +1,4 @@ -From dd5889d527000a040b441efb2ee0df9513afb9a2 Mon Sep 17 00:00:00 2001 +From 46e8ebbb8253470489be0c5a9a481eea86507f79 Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Sun, 20 Apr 2025 00:30:29 +0200 Subject: [PATCH 02/14] Hotfix: ignore rejected events in delayed_events @@ -8,10 +8,10 @@ Subject: [PATCH 02/14] Hotfix: ignore rejected events in delayed_events 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/synapse/handlers/delayed_events.py b/synapse/handlers/delayed_events.py -index beb0e819c2..f6ed21ea92 100644 +index ce13dcc737..588cc35632 100644 --- a/synapse/handlers/delayed_events.py +++ b/synapse/handlers/delayed_events.py -@@ -211,8 +211,13 @@ class DelayedEventsHandler: +@@ -216,8 +216,13 @@ class DelayedEventsHandler: ) event = await self._store.get_event( diff --git a/packages/overlays/matrix-synapse/patches/0003-Add-too-much-logging-to-room-summary-over-federation.patch b/packages/overlays/matrix-synapse/patches/0003-Add-too-much-logging-to-room-summary-over-federation.patch
index a718d84..a5b5f43 100644 --- a/packages/overlays/matrix-synapse/patches/0003-Add-too-much-logging-to-room-summary-over-federation.patch +++ b/packages/overlays/matrix-synapse/patches/0003-Add-too-much-logging-to-room-summary-over-federation.patch
@@ -1,4 +1,4 @@ -From e0996b0c9944eb31f8332875fa670c81b8952ce0 Mon Sep 17 00:00:00 2001 +From 370ea67df812fc3174bf480ebe12068b14922d90 Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Wed, 23 Apr 2025 17:53:52 +0200 Subject: [PATCH 03/14] Add too much logging to room summary over federation diff --git a/packages/overlays/matrix-synapse/patches/0004-Log-entire-room-if-accessibility-check-fails.patch b/packages/overlays/matrix-synapse/patches/0004-Log-entire-room-if-accessibility-check-fails.patch
index ec18f37..f5db38e 100644 --- a/packages/overlays/matrix-synapse/patches/0004-Log-entire-room-if-accessibility-check-fails.patch +++ b/packages/overlays/matrix-synapse/patches/0004-Log-entire-room-if-accessibility-check-fails.patch
@@ -1,4 +1,4 @@ -From 215fd0c4c2e0bdf26241e66c871464d3638f7c83 Mon Sep 17 00:00:00 2001 +From 5c0e74cb20848a62e9921e697249d0cb1d6df035 Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Wed, 23 Apr 2025 18:24:57 +0200 Subject: [PATCH 04/14] Log entire room if accessibility check fails diff --git a/packages/overlays/matrix-synapse/patches/0005-Log-policy-server-rejected-events.patch b/packages/overlays/matrix-synapse/patches/0005-Log-policy-server-rejected-events.patch
index 5259bb6..401ff4d 100644 --- a/packages/overlays/matrix-synapse/patches/0005-Log-policy-server-rejected-events.patch +++ b/packages/overlays/matrix-synapse/patches/0005-Log-policy-server-rejected-events.patch
@@ -1,4 +1,4 @@ -From eb1edb3363a9d66115e756043cb93fa64c28f5d3 Mon Sep 17 00:00:00 2001 +From 34afe28e5c91d72f449cd453944a7763b6cc5c6b Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Tue, 27 May 2025 05:21:46 +0200 Subject: [PATCH 05/14] Log policy server rejected events diff --git a/packages/overlays/matrix-synapse/patches/0006-Use-parse_boolean-for-unredacted-content.patch b/packages/overlays/matrix-synapse/patches/0006-Use-parse_boolean-for-unredacted-content.patch
index ef55a96..e0ee048 100644 --- a/packages/overlays/matrix-synapse/patches/0006-Use-parse_boolean-for-unredacted-content.patch +++ b/packages/overlays/matrix-synapse/patches/0006-Use-parse_boolean-for-unredacted-content.patch
@@ -1,4 +1,4 @@ -From 1fd2cf63b7a083f90e53d5cfc1bcfcffdc3b60dd Mon Sep 17 00:00:00 2001 +From b8ac66b50a38d38a34e4d5f003d39674eaffe77f Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Tue, 27 May 2025 06:14:26 +0200 Subject: [PATCH 06/14] Use parse_boolean for unredacted content @@ -8,10 +8,10 @@ Subject: [PATCH 06/14] Use parse_boolean for unredacted content 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py -index 6b0deda0df..9333f486f1 100644 +index 64deae7650..eadfd721b3 100644 --- a/synapse/rest/client/room.py +++ b/synapse/rest/client/room.py -@@ -927,10 +927,9 @@ class RoomEventServlet(RestServlet): +@@ -930,10 +930,9 @@ class RoomEventServlet(RestServlet): requester = await self.auth.get_user_by_req(request, allow_guest=True) include_unredacted_content = self.msc2815_enabled and ( diff --git a/packages/overlays/matrix-synapse/patches/0007-Expose-tombstone-in-room-admin-api.patch b/packages/overlays/matrix-synapse/patches/0007-Expose-tombstone-in-room-admin-api.patch
index 3e33470..5b20b06 100644 --- a/packages/overlays/matrix-synapse/patches/0007-Expose-tombstone-in-room-admin-api.patch +++ b/packages/overlays/matrix-synapse/patches/0007-Expose-tombstone-in-room-admin-api.patch
@@ -1,4 +1,4 @@ -From 8fa7b06fdc31b3675c01d3e33fa13db3f56039c6 Mon Sep 17 00:00:00 2001 +From 09eebe99f37c523fe1de000fbc7fb3dc692faee7 Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Tue, 27 May 2025 06:37:52 +0200 Subject: [PATCH 07/14] Expose tombstone in room admin api @@ -10,7 +10,7 @@ Subject: [PATCH 07/14] Expose tombstone in room admin api 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/synapse/rest/admin/rooms.py b/synapse/rest/admin/rooms.py -index efcc60a2de..fe316c4d9d 100644 +index 5bed89c2c4..87a851bf64 100644 --- a/synapse/rest/admin/rooms.py +++ b/synapse/rest/admin/rooms.py @@ -251,6 +251,10 @@ class ListRoomRestServlet(RestServlet): @@ -33,10 +33,10 @@ index efcc60a2de..fe316c4d9d 100644 response = { diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py -index 9333f486f1..c731f83fe2 100644 +index eadfd721b3..e7f41f0079 100644 --- a/synapse/rest/client/room.py +++ b/synapse/rest/client/room.py -@@ -931,7 +931,6 @@ class RoomEventServlet(RestServlet): +@@ -934,7 +934,6 @@ class RoomEventServlet(RestServlet): request, "fi.mau.msc2815.include_unredacted_content" ) @@ -45,10 +45,10 @@ index 9333f486f1..c731f83fe2 100644 if include_unredacted_content and not await self.auth.is_server_admin( requester diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py -index 604365badf..511550f2b4 100644 +index 6ffc3aed34..0cb87a811c 100644 --- a/synapse/storage/databases/main/room.py +++ b/synapse/storage/databases/main/room.py -@@ -610,6 +610,7 @@ class RoomWorkerStore(CacheInvalidationWorkerStore): +@@ -611,6 +611,7 @@ class RoomWorkerStore(CacheInvalidationWorkerStore): search_term: Optional[str], public_rooms: Optional[bool], empty_rooms: Optional[bool], @@ -56,7 +56,7 @@ index 604365badf..511550f2b4 100644 ) -> Tuple[List[Dict[str, Any]], int]: """Function to retrieve a paginated list of rooms as json. -@@ -629,6 +630,7 @@ class RoomWorkerStore(CacheInvalidationWorkerStore): +@@ -630,6 +631,7 @@ class RoomWorkerStore(CacheInvalidationWorkerStore): If true, empty rooms are queried. if false, empty rooms are excluded from the query. When it is none (the default), both empty rooms and none-empty rooms are queried. @@ -64,7 +64,7 @@ index 604365badf..511550f2b4 100644 Returns: A list of room dicts and an integer representing the total number of rooms that exist given this query -@@ -797,11 +799,43 @@ class RoomWorkerStore(CacheInvalidationWorkerStore): +@@ -798,11 +800,43 @@ class RoomWorkerStore(CacheInvalidationWorkerStore): room_count = cast(Tuple[int], txn.fetchone()) return rooms, room_count[0] diff --git a/packages/overlays/matrix-synapse/patches/0008-fix-Always-recheck-messages-pagination-data-if-a-bac.patch b/packages/overlays/matrix-synapse/patches/0008-fix-Always-recheck-messages-pagination-data-if-a-bac.patch
index 562b4e3..f0051e6 100644 --- a/packages/overlays/matrix-synapse/patches/0008-fix-Always-recheck-messages-pagination-data-if-a-bac.patch +++ b/packages/overlays/matrix-synapse/patches/0008-fix-Always-recheck-messages-pagination-data-if-a-bac.patch
@@ -1,4 +1,4 @@ -From dab8c4190da5acdd7c7046a9cef664024cf128d3 Mon Sep 17 00:00:00 2001 +From 0ed11113c980e5edfd79c8c0f78b245adf823ac2 Mon Sep 17 00:00:00 2001 From: Jason Little <j.little@famedly.com> Date: Wed, 30 Apr 2025 09:29:42 -0500 Subject: [PATCH 08/14] fix: Always recheck `/messages` pagination data if a @@ -10,10 +10,10 @@ Subject: [PATCH 08/14] fix: Always recheck `/messages` pagination data if a 2 files changed, 34 insertions(+), 37 deletions(-) diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py -index c709ed2c63..543f06e76c 100644 +index 34aae7ef3c..b3226de999 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py -@@ -194,7 +194,7 @@ class FederationHandler: +@@ -197,7 +197,7 @@ class FederationHandler: @tag_args async def maybe_backfill( self, room_id: str, current_depth: int, limit: int, record_time: bool = True @@ -22,7 +22,7 @@ index c709ed2c63..543f06e76c 100644 """Checks the database to see if we should backfill before paginating, and if so do. -@@ -208,8 +208,6 @@ class FederationHandler: +@@ -211,8 +211,6 @@ class FederationHandler: should back paginate. record_time: Whether to record the time it takes to backfill. @@ -31,7 +31,7 @@ index c709ed2c63..543f06e76c 100644 """ # Starting the processing time here so we can include the room backfill # linearizer lock queue in the timing -@@ -235,7 +233,7 @@ class FederationHandler: +@@ -238,7 +236,7 @@ class FederationHandler: limit: int, *, processing_start_time: Optional[int], @@ -40,7 +40,7 @@ index c709ed2c63..543f06e76c 100644 """ Checks whether the `current_depth` is at or approaching any backfill points in the room and if so, will backfill. We only care about -@@ -309,7 +307,7 @@ class FederationHandler: +@@ -312,7 +310,7 @@ class FederationHandler: limit=1, ) if not have_later_backfill_points: @@ -49,7 +49,7 @@ index c709ed2c63..543f06e76c 100644 logger.debug( "_maybe_backfill_inner: all backfill points are *after* current depth. Trying again with later backfill points." -@@ -329,15 +327,15 @@ class FederationHandler: +@@ -333,15 +331,15 @@ class FederationHandler: ) # We return `False` because we're backfilling in the background and there is # no new events immediately for the caller to know about yet. @@ -68,7 +68,7 @@ index c709ed2c63..543f06e76c 100644 # If we're approaching an extremity we trigger a backfill, otherwise we # no-op. -@@ -356,7 +354,7 @@ class FederationHandler: +@@ -360,7 +358,7 @@ class FederationHandler: current_depth, limit, ) @@ -77,7 +77,7 @@ index c709ed2c63..543f06e76c 100644 # For performance's sake, we only want to paginate from a particular extremity # if we can actually see the events we'll get. Otherwise, we'd just spend a lot -@@ -424,7 +422,7 @@ class FederationHandler: +@@ -428,7 +426,7 @@ class FederationHandler: logger.debug( "_maybe_backfill_inner: found no extremities which would be visible" ) @@ -86,7 +86,7 @@ index c709ed2c63..543f06e76c 100644 logger.debug( "_maybe_backfill_inner: extremities_to_request %s", extremities_to_request -@@ -447,7 +445,7 @@ class FederationHandler: +@@ -451,7 +449,7 @@ class FederationHandler: ) ) @@ -95,7 +95,7 @@ index c709ed2c63..543f06e76c 100644 # TODO: Should we try multiple of these at a time? # Number of contacted remote homeservers that have denied our backfill -@@ -470,7 +468,7 @@ class FederationHandler: +@@ -474,7 +472,7 @@ class FederationHandler: # If this succeeded then we probably already have the # appropriate stuff. # TODO: We can probably do something more intelligent here. @@ -104,7 +104,7 @@ index c709ed2c63..543f06e76c 100644 except NotRetryingDestination as e: logger.info("_maybe_backfill_inner: %s", e) continue -@@ -494,7 +492,7 @@ class FederationHandler: +@@ -498,7 +496,7 @@ class FederationHandler: ) denied_count += 1 if denied_count >= max_denied_count: @@ -113,7 +113,7 @@ index c709ed2c63..543f06e76c 100644 continue logger.info("Failed to backfill from %s because %s", dom, e) -@@ -510,7 +508,7 @@ class FederationHandler: +@@ -514,7 +512,7 @@ class FederationHandler: ) denied_count += 1 if denied_count >= max_denied_count: @@ -122,7 +122,7 @@ index c709ed2c63..543f06e76c 100644 continue logger.info("Failed to backfill from %s because %s", dom, e) -@@ -522,7 +520,7 @@ class FederationHandler: +@@ -526,7 +524,7 @@ class FederationHandler: logger.exception("Failed to backfill from %s because %s", dom, e) continue @@ -131,9 +131,9 @@ index c709ed2c63..543f06e76c 100644 # If we have the `processing_start_time`, then we can make an # observation. We wouldn't have the `processing_start_time` in the case -@@ -534,14 +532,9 @@ class FederationHandler: - (processing_end_time - processing_start_time) / 1000 - ) +@@ -538,14 +536,9 @@ class FederationHandler: + **{SERVER_NAME_LABEL: self.server_name} + ).observe((processing_end_time - processing_start_time) / 1000) - success = await try_backfill(likely_domains) - if success: @@ -148,10 +148,10 @@ index c709ed2c63..543f06e76c 100644 async def send_invite(self, target_host: str, event: EventBase) -> EventBase: """Sends the invite to the remote server for signing. diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py -index 4070b74b7a..81cda38549 100644 +index df1a7e714c..503c58e32a 100644 --- a/synapse/handlers/pagination.py +++ b/synapse/handlers/pagination.py -@@ -577,27 +577,31 @@ class PaginationHandler: +@@ -579,27 +579,31 @@ class PaginationHandler: or missing_too_many_events or not_enough_events_to_fill_response ): diff --git a/packages/overlays/matrix-synapse/patches/0009-Fix-pagination-with-large-gaps-of-rejected-events.patch b/packages/overlays/matrix-synapse/patches/0009-Fix-pagination-with-large-gaps-of-rejected-events.patch
index d52bc05..f0ee50e 100644 --- a/packages/overlays/matrix-synapse/patches/0009-Fix-pagination-with-large-gaps-of-rejected-events.patch +++ b/packages/overlays/matrix-synapse/patches/0009-Fix-pagination-with-large-gaps-of-rejected-events.patch
@@ -1,4 +1,4 @@ -From 683be37ce51d7355b25384942c44c5b39a13b11f Mon Sep 17 00:00:00 2001 +From 57743dad758b46cda09f69ee44c99cbd649f873e Mon Sep 17 00:00:00 2001 From: Nicolas Werner <nicolas.werner@hotmail.de> Date: Sun, 8 Jun 2025 23:14:31 +0200 Subject: [PATCH 09/14] Fix pagination with large gaps of rejected events @@ -8,10 +8,10 @@ Subject: [PATCH 09/14] Fix pagination with large gaps of rejected events 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py -index 81cda38549..365c9cabcb 100644 +index 503c58e32a..43fdbc2e83 100644 --- a/synapse/handlers/pagination.py +++ b/synapse/handlers/pagination.py -@@ -510,7 +510,7 @@ class PaginationHandler: +@@ -512,7 +512,7 @@ class PaginationHandler: ( events, next_key, @@ -20,7 +20,7 @@ index 81cda38549..365c9cabcb 100644 ) = await self.store.paginate_room_events_by_topological_ordering( room_id=room_id, from_key=from_token.room_key, -@@ -593,7 +593,7 @@ class PaginationHandler: +@@ -595,7 +595,7 @@ class PaginationHandler: ( events, next_key, @@ -29,7 +29,7 @@ index 81cda38549..365c9cabcb 100644 ) = await self.store.paginate_room_events_by_topological_ordering( room_id=room_id, from_key=from_token.room_key, -@@ -616,6 +616,15 @@ class PaginationHandler: +@@ -619,6 +619,15 @@ class PaginationHandler: next_token = from_token.copy_and_replace(StreamKeyType.ROOM, next_key) diff --git a/packages/overlays/matrix-synapse/patches/0010-Fix-nix-flake.patch b/packages/overlays/matrix-synapse/patches/0010-Fix-nix-flake.patch
index d8f14e3..3db7c75 100644 --- a/packages/overlays/matrix-synapse/patches/0010-Fix-nix-flake.patch +++ b/packages/overlays/matrix-synapse/patches/0010-Fix-nix-flake.patch
@@ -1,4 +1,4 @@ -From a1216b4353f621ee80b3dd9acf25241af5c4d7fd Mon Sep 17 00:00:00 2001 +From 2f4533a3c26c62b2e287c3e5a284ca8ee1042546 Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Mon, 9 Jun 2025 17:38:34 +0200 Subject: [PATCH 10/14] Fix nix flake diff --git a/packages/overlays/matrix-synapse/patches/0011-Fix-gitignore-to-ignore-.venv.patch b/packages/overlays/matrix-synapse/patches/0011-Fix-gitignore-to-ignore-.venv.patch
index 292eaf3..0bd53e3 100644 --- a/packages/overlays/matrix-synapse/patches/0011-Fix-gitignore-to-ignore-.venv.patch +++ b/packages/overlays/matrix-synapse/patches/0011-Fix-gitignore-to-ignore-.venv.patch
@@ -1,4 +1,4 @@ -From 2158f1b2759f571df4fef6b35a897e4ab82525b0 Mon Sep 17 00:00:00 2001 +From 2fb09d660565b39cdd1077f0e29580c72a8bbb47 Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Mon, 9 Jun 2025 17:46:10 +0200 Subject: [PATCH 11/14] Fix gitignore to ignore .venv diff --git a/packages/overlays/matrix-synapse/patches/0012-Devenv-use-postgres-17.patch b/packages/overlays/matrix-synapse/patches/0012-Devenv-use-postgres-17.patch
index 8752404..545933b 100644 --- a/packages/overlays/matrix-synapse/patches/0012-Devenv-use-postgres-17.patch +++ b/packages/overlays/matrix-synapse/patches/0012-Devenv-use-postgres-17.patch
@@ -1,4 +1,4 @@ -From 645ca625e111a563720b93d6b2c738631c4769c2 Mon Sep 17 00:00:00 2001 +From 80335192cafb2b3b33a8822ba3f720d400853d8c Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Fri, 25 Jul 2025 08:25:28 +0200 Subject: [PATCH 12/14] Devenv: use postgres 17 diff --git a/packages/overlays/matrix-synapse/patches/0013-RequestRatelimiter-expose-can_do_action.patch b/packages/overlays/matrix-synapse/patches/0013-RequestRatelimiter-expose-can_do_action.patch
index e48072a..be4e1be 100644 --- a/packages/overlays/matrix-synapse/patches/0013-RequestRatelimiter-expose-can_do_action.patch +++ b/packages/overlays/matrix-synapse/patches/0013-RequestRatelimiter-expose-can_do_action.patch
@@ -1,4 +1,4 @@ -From 0ed142d0be333116e52586206e7b3dd2faf5c95e Mon Sep 17 00:00:00 2001 +From 49d21ee7150580474879b8c9e149c273dd24ad0e Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Fri, 25 Jul 2025 08:26:15 +0200 Subject: [PATCH 13/14] RequestRatelimiter: expose can_do_action diff --git a/packages/overlays/matrix-synapse/patches/0014-Add-bulk-send-events-endpoint.patch b/packages/overlays/matrix-synapse/patches/0014-Add-bulk-send-events-endpoint.patch
index cdbbbd7..b051bf7 100644 --- a/packages/overlays/matrix-synapse/patches/0014-Add-bulk-send-events-endpoint.patch +++ b/packages/overlays/matrix-synapse/patches/0014-Add-bulk-send-events-endpoint.patch
@@ -1,4 +1,4 @@ -From 2d59d7575eb589bfd84808dd72c309a08151d6ba Mon Sep 17 00:00:00 2001 +From c48c105727590a1a0a0e9fd0ac3422acead00e4b Mon Sep 17 00:00:00 2001 From: Rory& <root@rory.gay> Date: Sat, 26 Jul 2025 09:50:56 +0200 Subject: [PATCH 14/14] Add bulk send events endpoint @@ -23,7 +23,7 @@ index a279db1cc5..5e18750e15 100644 } diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py -index c731f83fe2..df29d32495 100644 +index e7f41f0079..d054d87595 100644 --- a/synapse/rest/client/room.py +++ b/synapse/rest/client/room.py @@ -23,10 +23,12 @@ @@ -47,7 +47,7 @@ index c731f83fe2..df29d32495 100644 from synapse.http.server import HttpServer from synapse.http.servlet import ( ResolveRoomIdMixin, -@@ -481,7 +484,6 @@ class RoomSendEventRestServlet(TransactionRestServlet): +@@ -482,7 +485,6 @@ class RoomSendEventRestServlet(TransactionRestServlet): txn_id, ) @@ -55,7 +55,7 @@ index c731f83fe2..df29d32495 100644 def _parse_request_delay( request: SynapseRequest, max_delay: Optional[int], -@@ -1622,6 +1624,118 @@ class RoomSummaryRestServlet(ResolveRoomIdMixin, RestServlet): +@@ -1635,6 +1637,118 @@ class RoomSummaryRestServlet(ResolveRoomIdMixin, RestServlet): remote_room_hosts, ) @@ -174,7 +174,7 @@ index c731f83fe2..df29d32495 100644 def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None: RoomStateEventRestServlet(hs).register(http_server) -@@ -1631,6 +1745,7 @@ def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None: +@@ -1644,6 +1758,7 @@ def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None: JoinRoomAliasServlet(hs).register(http_server) RoomMembershipRestServlet(hs).register(http_server) RoomSendEventRestServlet(hs).register(http_server)