1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-13 10:13:39 +02:00

ibus: add ibusEngine type and nest panel option

the panel option was outside of the 'i18n.inputMethod.ibus' option
This commit is contained in:
nyadiia 2024-04-23 13:46:54 -05:00
parent 6303bd7085
commit def6605523
No known key found for this signature in database
GPG Key ID: 229718FDC160E880

View File

@ -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,7 +24,6 @@ in {
Enabled IBus engines.
'';
};
};
panel = mkOption {
type = with types; nullOr path;
default = null;
@ -29,6 +34,7 @@ in {
'';
};
};
};
config = mkIf (im.enabled == "ibus") {
i18n.inputMethod.package = ibusPackage;