From 904a73b51df0cc573a5452937e58478b06323d8f Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 2 Dec 2023 15:33:58 +0100 Subject: [PATCH] fix(mautrix-telegram): should not try to update config See: https://github.com/mautrix/python/pull/152 --- hosts/nachtigall/apps/matrix/mautrix-telegram.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hosts/nachtigall/apps/matrix/mautrix-telegram.nix b/hosts/nachtigall/apps/matrix/mautrix-telegram.nix index b9fb60ae..d5b50106 100644 --- a/hosts/nachtigall/apps/matrix/mautrix-telegram.nix +++ b/hosts/nachtigall/apps/matrix/mautrix-telegram.nix @@ -205,7 +205,19 @@ lottieconverter # for animated stickers conversion, unfree package ffmpeg # if converting animated stickers to webm (very slow!) ]; - systemd.services.mautrix-telegram.serviceConfig = { + systemd.services.mautrix-telegram.serviceConfig = + let + cfg = config.services.mautrix-telegram; + settingsFormat = pkgs.formats.json {}; + settingsFile = + settingsFormat.generate "mautrix-telegram-config.json" cfg.settings; + in + { User = "matrix-synapse"; + ExecStart = '' + ${pkgs.mautrix-telegram}/bin/mautrix-telegram \ + --config='${settingsFile}' + --no-update + ''; }; }