Files
nix-config/modules/i18n/input.org
T
phundrak ba018ef841 refactor: change to litterate config
Configuration is now held by the `.org` files. All `.nix` files are
tangled from the org-mode files.
2026-10-06 12:40:58 +02:00

1.7 KiB
Raw Blame History

Input Methods

Input Methods

I type in more than one script, so I need a proper input method framework rather than relying on whatever the desktop environment ships with. Plus, the default AFNOR bépo layout is currently buggy, with some dead keys not working properly, such as AltGr+s, but it isn’t with fcitx5. Here’s the nixos.i18n-input module.

{
  flake.modules.nixos.i18n-input = {pkgs, ...}: {
    i18n.inputMethod = {
      <<enable-fcitx5>>
      <<fcitx5-addons>>
    };
  };
}

Enabling fcitx5

fcitx5 is the input method framework I’ve settled on; it covers everything from CJK input to custom table-based methods.

enable = true;
type = "fcitx5";

Addons

fcitx5-gtk gets fcitx5 working inside GTK applications, and the Qt equivalents (fcitx5-configtool, fcitx5-with-addons) do the same for Qt ones whilst also giving me a GUI to configure it all. fcitx5-mozc-ut adds Japanese input through Mozc, and qt6Packages.fcitx5-chinese-addons adds the table addons Chinese input methods need. I don’t actually need this package for Chinese itself, but it is somehow necessary for the X-SAMPA input method, which I get from fcitx5-table-other. I have it to type IPA on the fly when working on my constructed languages. Lastly, fcitx5-nord just reskins the UI to match the rest of my setup.

fcitx5.addons = with pkgs; [
  fcitx5-gtk
  fcitx5-mozc-ut
  fcitx5-nord
  fcitx5-table-other
  qt6Packages.fcitx5-chinese-addons
  qt6Packages.fcitx5-configtool
  qt6Packages.fcitx5-with-addons
];