1 { config, pkgs, lib, generators, ... }:
4 cfg = config.i18n.inputMethod.kime;
5 yamlFormat = pkgs.formats.yaml { };
9 i18n.inputMethod.kime = {
11 type = yamlFormat.type;
13 example = literalExpression ''
16 modules = ["Xim" "Indicator"];
30 description = lib.mdDoc ''
31 kime configuration. Refer to <https://github.com/Riey/kime/blob/v${pkgs.kime.version}/docs/CONFIGURATION.md> for details on supported values.
37 config = mkIf (config.i18n.inputMethod.enabled == "kime") {
38 i18n.inputMethod.package = pkgs.kime;
40 environment.variables = {
41 GTK_IM_MODULE = "kime";
42 QT_IM_MODULE = "kime";
43 XMODIFIERS = "@im=kime";
46 environment.etc."xdg/kime/config.yaml".text = replaceStrings [ "\\\\" ] [ "\\" ] (builtins.toJSON cfg.config);
49 # uses attributes of the linked package
50 meta.buildDocsInSandbox = false;