feat(i18n): proper multilingual input

Use fcitx5 to switch between different inputs. Installed mozc-ut for
Japanese input with the bepo layout, as well as fcitx5-chinese to load
table-defined layouts for the IPA/X-SAMPA input method.

Currently, mozc_server and fcitx5 need to be launched by the
compositor (only Hyprland for now), auto-launching from module options
needs to be implemented in the future.
This commit is contained in:
2026-04-27 19:57:23 +02:00
parent 171d635b72
commit f3141d6108
7 changed files with 1719 additions and 13 deletions

24
system/i18n/input.nix Normal file
View File

@@ -0,0 +1,24 @@
{
lib,
config,
...
}:
with lib; let
cfg = config.mySystem.i18n.input;
in {
options.mySystem.i18n.input.enable = mkEnableOption "Enable i18n input with fcitx5";
config.i18n.inputMethod = mkIf cfg.enable {
enable = true;
type = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-gtk
fcitx5-mozc-ut # Japanese input support
fcitx5-nord
fcitx5-table-other # X-SAMPA to IPA support
qt6Packages.fcitx5-chinese-addons # allow to load table addons
qt6Packages.fcitx5-configtool
qt6Packages.fcitx5-with-addons
];
};
}