Enabling Chinese input on NixOS

It was a bit tricky to find the right package name that contained the Pinyin methods I wanted, ultimately I spotted it through a random google search :-( The rest of the config I was able to guess from the configuration.nix man page.

  i18n.supportedLocales = [ "en_US.UTF-8/UTF-8" "zh_CN.UTF-8/UTF-8" ];

  i18n.inputMethod = {
    enabled = "fcitx5";
    fcitx5.addons = with pkgs; [
        fcitx5-gtk
        fcitx5-chinese-addons
        ];
  };

After a nixos-rebuild switch I was able to fcitx5-config-qt and pick a Pinyin keyboard. After that I just have to launch fcitx5 for whatever WM I use. It even works in qutebrowser which has been something of a problem for me depending on which system I’m using. I have some where it works and others where it doesn’t.

Tags

=> #nixos | #fcitx5 | #chinese

Navigation

=> index | tags

created: 2023-09-23

(re)generated: 2025-01-11

Proxy Information
Original URL
gemini://thatit.be/2023-09-23-09-27-00.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
432.307663 milliseconds
Gemini-to-HTML Time
0.381166 milliseconds

This content has been proxied by September (ba2dc).