Merge pull request #292607 from NickCao/fcitx5-nixos

nixos/fcitx5: add plasma6 support option
This commit is contained in:
Nick Cao 2024-03-01 13:36:04 -05:00 committed by GitHub
commit fcba479b33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 = { };