nixos/fcitx5: add plasma6 support option

This commit is contained in:
Nick Cao 2024-03-01 11:34:09 -05:00
parent 3d01643d7b
commit 6e2d4054ae
No known key found for this signature in database

View File

@ -5,7 +5,10 @@ with lib;
let
im = config.i18n.inputMethod;
cfg = im.fcitx5;
fcitx5Package = pkgs.fcitx5-with-addons.override { inherit (cfg) addons; };
fcitx5Package =
if cfg.plasma6Support
then pkgs.qt6Packages.fcitx5-with-addons.override { inherit (cfg) addons; }
else pkgs.libsForQt5.fcitx5-with-addons.override { inherit (cfg) addons; };
settingsFormat = pkgs.formats.ini { };
in
{
@ -27,6 +30,14 @@ in
See [Using Fcitx 5 on Wayland](https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland).
'';
};
plasma6Support = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Use qt6 versions of fcitx5 packages.
Required for configuring fcitx5 in KDE System Settings.
'';
};
quickPhrase = mkOption {
type = with types; attrsOf str;
default = { };