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 T383838configuration.nix man page.
i18n.supportedLocales = [ "enUS.UTF-8/UTF-8" "zhCN.UTF-8/UTF-8" ];
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-gtk
fcitx5-chinese-addons
];
};
After a T383838nixos-rebuild switch I was able to T383838fcitx5-config-qt and pick a Pinyin keyboard. After that I just have to launch T383838fcitx5 for whatever WM I use. It even works in T383838qutebrowser 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
Tags
Navigation