diff options
Diffstat (limited to 'nixos/modules/i18n/input-method/ibus.nix')
-rw-r--r-- | nixos/modules/i18n/input-method/ibus.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/i18n/input-method/ibus.nix b/nixos/modules/i18n/input-method/ibus.nix index c82f0099253b8..4af848c720150 100644 --- a/nixos/modules/i18n/input-method/ibus.nix +++ b/nixos/modules/i18n/input-method/ibus.nix @@ -3,10 +3,12 @@ with lib; let - cfg = config.i18n.inputMethod.ibus; + imcfg = config.i18n.inputMethod; + cfg = imcfg.ibus; ibusPackage = pkgs.ibus-with-plugins.override { plugins = cfg.engines; }; - ibusEngine = types.package // { + ibusEngine = lib.types.mkOptionType { name = "ibus-engine"; + inherit (lib.types.package) descriptionClass merge; check = x: (lib.types.package.check x) && (attrByPath ["meta" "isIbusEngine"] false x); }; @@ -52,7 +54,7 @@ in }; }; - config = mkIf (config.i18n.inputMethod.enabled == "ibus") { + config = mkIf (imcfg.enable && imcfg.type == "ibus") { i18n.inputMethod.package = ibusPackage; environment.systemPackages = [ |