fcitx5: allow to set fcitx5-with-addons

Now there's `libsForQt5.fcitx5` and `kdePackages.fcitx5` in nixpkgs, we
should allow user to choose which one to use.
This commit is contained in:
wrvsrx 2024-08-26 10:34:51 +08:00
parent c2cd2a52e0
commit 83388bccbd
No known key found for this signature in database

View file

@ -5,11 +5,18 @@ with lib;
let
im = config.i18n.inputMethod;
cfg = im.fcitx5;
fcitx5Package =
pkgs.libsForQt5.fcitx5-with-addons.override { inherit (cfg) addons; };
fcitx5Package = cfg.fcitx5-with-addons.override { inherit (cfg) addons; };
in {
options = {
i18n.inputMethod.fcitx5 = {
fcitx5-with-addons = mkOption {
type = types.package;
default = pkgs.libsForQt5.fcitx5-with-addons;
example = literalExpression "pkgs.kdePackages.fcitx5-with-addons";
description = ''
The fcitx5 package to use.
'';
};
addons = mkOption {
type = with types; listOf package;
default = [ ];