From def660552388845063fde76ee0b72184c188f5b7 Mon Sep 17 00:00:00 2001 From: nyadiia Date: Tue, 23 Apr 2024 13:46:54 -0500 Subject: [PATCH] ibus: add ibusEngine type and nest panel option the panel option was outside of the 'i18n.inputMethod.ibus' option --- modules/i18n/input-method/ibus.nix | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/modules/i18n/input-method/ibus.nix b/modules/i18n/input-method/ibus.nix index 618ebe98..99c148cb 100644 --- a/modules/i18n/input-method/ibus.nix +++ b/modules/i18n/input-method/ibus.nix @@ -6,6 +6,12 @@ let im = config.i18n.inputMethod; cfg = im.ibus; impanel = optionalString (cfg.panel != null) "--panel=${cfg.panel}"; + ibusEngine = types.package // { + name = "ibus-engine"; + check = x: + (lib.types.package.check x) + && (attrByPath [ "meta" "isIbusEngine" ] false x); + }; ibusPackage = pkgs.ibus-with-plugins.override { inherit (cfg) engines; }; in { options = { @@ -18,15 +24,15 @@ in { Enabled IBus engines. ''; }; - }; - panel = mkOption { - type = with types; nullOr path; - default = null; - example = literalExpression '' - "''${pkgs.plasma5Packages.plasma-desktop}/libexec/kimpanel-ibus-panel"''; - description = '' - Replace the IBus panel with another panel. - ''; + panel = mkOption { + type = with types; nullOr path; + default = null; + example = literalExpression '' + "''${pkgs.plasma5Packages.plasma-desktop}/libexec/kimpanel-ibus-panel"''; + description = '' + Replace the IBus panel with another panel. + ''; + }; }; };