Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

84 lines
1.7 KiB
Nix

{
config,
pkgs,
lib,
generators,
...
}:
let
imcfg = config.i18n.inputMethod;
in
{
imports = [
(lib.mkRemovedOptionModule [
"i18n"
"inputMethod"
"kime"
"config"
] "Use i18n.inputMethod.kime.* instead")
];
options.i18n.inputMethod.kime = {
daemonModules = lib.mkOption {
type = lib.types.listOf (
lib.types.enum [
"Xim"
"Wayland"
"Indicator"
]
);
default = [
"Xim"
"Wayland"
"Indicator"
];
example = [
"Xim"
"Indicator"
];
description = ''
List of enabled daemon modules
'';
};
iconColor = lib.mkOption {
type = lib.types.enum [
"Black"
"White"
];
default = "Black";
example = "White";
description = ''
Color of the indicator icon
'';
};
extraConfig = lib.mkOption {
type = lib.types.lines;
default = "";
description = ''
extra kime configuration. Refer to <https://github.com/Riey/kime/blob/v${pkgs.kime.version}/docs/CONFIGURATION.md> for details on supported values.
'';
};
};
config = lib.mkIf (imcfg.enable && imcfg.type == "kime") {
i18n.inputMethod.package = pkgs.kime;
environment.variables = {
GTK_IM_MODULE = "kime";
QT_IM_MODULE = "kime";
XMODIFIERS = "@im=kime";
};
environment.etc."xdg/kime/config.yaml".text = ''
daemon:
modules: [${lib.concatStringsSep "," imcfg.kime.daemonModules}]
indicator:
icon_color: ${imcfg.kime.iconColor}
''
+ imcfg.kime.extraConfig;
};
# uses attributes of the linked package
meta.buildDocsInSandbox = false;
}