input methods: add hime

This commit is contained in:
Antonio Yang
2020-10-03 22:27:22 +08:00
parent 9d71f4f2e2
commit 0c138794af
5 changed files with 102 additions and 1 deletions
+28
View File
@@ -0,0 +1,28 @@
{ config, pkgs, ... }:
with lib;
{
options = {
i18n.inputMethod.hime = {
enableChewing = mkOption {
type = with types; nullOr bool;
default = null;
description = "enable chewing input method";
};
enableAnthy = mkOption {
type = with types; nullOr bool;
default = null;
description = "enable anthy input method";
};
};
};
config = mkIf (config.i18n.inputMethod.enabled == "hime") {
environment.variables = {
GTK_IM_MODULE = "hime";
QT_IM_MODULE = "hime";
XMODIFIERS = "@im=hime";
};
services.xserver.displayManager.sessionCommands = "${pkgs.hime}/bin/hime &";
};
}