From 6975dea4d3c862cf71f61eed9ef8d1e126b8db61 Mon Sep 17 00:00:00 2001 From: linsui <36977733+linsui@users.noreply.github.com> Date: Sat, 28 Dec 2024 15:10:34 +0800 Subject: [PATCH] nixos/fcitx5: fix quickphrase --- nixos/modules/i18n/input-method/fcitx5.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/modules/i18n/input-method/fcitx5.nix b/nixos/modules/i18n/input-method/fcitx5.nix index 06b1000c9959..5488b4fa89c6 100644 --- a/nixos/modules/i18n/input-method/fcitx5.nix +++ b/nixos/modules/i18n/input-method/fcitx5.nix @@ -117,9 +117,11 @@ in i18n.inputMethod.fcitx5.addons = lib.optionals (cfg.quickPhrase != { }) [ (pkgs.writeTextDir "share/fcitx5/data/QuickPhrase.mb" ( - lib.mapAttrsToList ( - name: value: "${name} ${builtins.replaceStrings [ "\\" "\n" ] [ "\\\\" "\\n" ] value}" - ) cfg.quickPhrase + lib.concatStringsSep "\n" ( + lib.mapAttrsToList ( + name: value: "${name} ${builtins.replaceStrings [ "\\" "\n" ] [ "\\\\" "\\n" ] value}" + ) cfg.quickPhrase + ) )) ] ++ lib.optionals (cfg.quickPhraseFiles != { }) [