From ba87eca95c7f63f1fc6a0b3ecf385e55e94ee0f2 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Tue, 24 Jan 2023 09:50:29 +0100 Subject: [PATCH] Fix synapse --- modules/services/matrix/default.nix | 1 + patches/212391.patch | 42 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 patches/212391.patch diff --git a/modules/services/matrix/default.nix b/modules/services/matrix/default.nix index 21cf5d42..f63852ae 100644 --- a/modules/services/matrix/default.nix +++ b/modules/services/matrix/default.nix @@ -49,6 +49,7 @@ enable_registration = false; report_stats = false; allow_guest_access = false; + suppress_key_server_warning = true; app_service_config_files = [ config.age.secrets."files/services/matrix-synapse/whatsapp-registration.yml".path config.age.secrets."files/services/matrix-synapse/slack-registration.yml".path diff --git a/patches/212391.patch b/patches/212391.patch new file mode 100644 index 00000000..d540178b --- /dev/null +++ b/patches/212391.patch @@ -0,0 +1,42 @@ +From b6f35193842a0bd634c058e5604a1b3647ac5ea9 Mon Sep 17 00:00:00 2001 +From: Charlotte Van Petegem +Date: Tue, 24 Jan 2023 09:44:36 +0100 +Subject: [PATCH] matrix-synapse,mautrix-facebook: fix runtime inclusion of + python3 systemd + +https://github.com/NixOS/nixpkgs/pull/192197 broke these packages by adding +systemd as a dependency. This meant that the included package was no longer the +python3 systemd package, but the general systemd derivation. This broke the +packages at runtime. This PR fixes that. +--- + pkgs/servers/matrix-synapse/default.nix | 2 +- + pkgs/servers/mautrix-facebook/default.nix | 3 +-- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix +index 18041897f2327..9fc2c676b9464 100644 +--- a/pkgs/servers/matrix-synapse/default.nix ++++ b/pkgs/servers/matrix-synapse/default.nix +@@ -1,5 +1,5 @@ + { lib, stdenv, fetchFromGitHub, python3, openssl, rustPlatform +-, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd ++, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform python3.pkgs.systemd + , nixosTests + , enableRedis ? true + , callPackage +diff --git a/pkgs/servers/mautrix-facebook/default.nix b/pkgs/servers/mautrix-facebook/default.nix +index fcef839a9ddf9..017501ded007b 100644 +--- a/pkgs/servers/mautrix-facebook/default.nix ++++ b/pkgs/servers/mautrix-facebook/default.nix +@@ -1,10 +1,9 @@ + { lib + , stdenv +-, systemd +-, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd + , fetchFromGitHub + , fetchpatch + , python3 ++, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform python3.pkgs.systemd + }: + + python3.pkgs.buildPythonPackage rec {