1 { config, pkgs, lib, generators, ... }:
3 imcfg = config.i18n.inputMethod;
6 (lib.mkRemovedOptionModule [ "i18n" "inputMethod" "kime" "config" ] "Use i18n.inputMethod.kime.* instead")
9 options.i18n.inputMethod.kime = {
10 daemonModules = lib.mkOption {
11 type = lib.types.listOf (lib.types.enum [ "Xim" "Wayland" "Indicator" ]);
12 default = [ "Xim" "Wayland" "Indicator" ];
13 example = [ "Xim" "Indicator" ];
15 List of enabled daemon modules
18 iconColor = lib.mkOption {
19 type = lib.types.enum [ "Black" "White" ];
23 Color of the indicator icon
26 extraConfig = lib.mkOption {
27 type = lib.types.lines;
30 extra kime configuration. Refer to <https://github.com/Riey/kime/blob/v${pkgs.kime.version}/docs/CONFIGURATION.md> for details on supported values.
35 config = lib.mkIf (imcfg.enable && imcfg.type == "kime") {
36 i18n.inputMethod.package = pkgs.kime;
38 environment.variables = {
39 GTK_IM_MODULE = "kime";
40 QT_IM_MODULE = "kime";
41 XMODIFIERS = "@im=kime";
44 environment.etc."xdg/kime/config.yaml".text = ''
46 modules: [${lib.concatStringsSep "," imcfg.kime.daemonModules}]
48 icon_color: ${imcfg.kime.iconColor}
49 '' + imcfg.kime.extraConfig;
52 # uses attributes of the linked package
53 meta.buildDocsInSandbox = false;