From 801b59a8cf2578005b1c5a592203b67642ec3df9 Mon Sep 17 00:00:00 2001 From: magic_rb Date: Wed, 18 Oct 2023 15:30:54 +0200 Subject: [PATCH] Attempt to fix signal locale Signed-off-by: magic_rb --- .../matrix/mautrix-signal/default.nix | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/nixng/containers/matrix/mautrix-signal/default.nix b/nixng/containers/matrix/mautrix-signal/default.nix index 083e8d7..33894e8 100644 --- a/nixng/containers/matrix/mautrix-signal/default.nix +++ b/nixng/containers/matrix/mautrix-signal/default.nix @@ -32,14 +32,26 @@ init.services.signald = { enabled = true; shutdownOnExit = true; - script = pkgs.writeShellScript "signald" '' - DATA_DIR="/var/lib/signald" - SOCKET_PATH="/var/run/signald/signald.sock" - mkdir -p $(dirname $SOCKET_PATH) + script = + let + locales = + [ + "C.UTF-8" + "en_US.UTF-8" + ]; + i18n = pkgs.glibcLocales.override { + inherit locales; + }; + in + pkgs.writeShellScript "signald" '' + DATA_DIR="/var/lib/signald" + SOCKET_PATH="/var/run/signald/signald.sock" + mkdir -p $(dirname $SOCKET_PATH) - export LANG=en_US.UTF-8 - ${lib.getExe' pkgs.signald "signald"} -d $DATA_DIR -s $SOCKET_PATH - ''; + export LANG=en_US.UTF-8 + export LOCALE_ARCHIVE=${i18n}/lib/locale/locale-archive + ${lib.getExe' pkgs.signald "signald"} -d $DATA_DIR -s $SOCKET_PATH + ''; }; }; };