23 lines
646 B
Nix
23 lines
646 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.nomarchy.system.inputMethod;
|
|
in
|
|
{
|
|
config = lib.mkIf cfg.enable {
|
|
# NixOS's i18n.inputMethod handles env vars (GTK_IM_MODULE, QT_IM_MODULE,
|
|
# XMODIFIERS, SDL_IM_MODULE) and the fcitx5-daemon autostart for us, so
|
|
# we don't ship a manual environment.d file or Hyprland exec-once.
|
|
i18n.inputMethod = {
|
|
enable = true;
|
|
type = "fcitx5";
|
|
fcitx5.addons = with pkgs; [
|
|
fcitx5-mozc # Japanese
|
|
kdePackages.fcitx5-chinese-addons
|
|
fcitx5-table-extra # Hanyu/Cangjie/etc.
|
|
fcitx5-gtk # GTK4/3 client
|
|
];
|
|
};
|
|
};
|
|
}
|