{ config, pkgs, lib, ... }: { # System-level fcitx5 configuration for Wayland # This prevents GTK_IM_MODULE from being set, which is recommended for Wayland i18n.inputMethod = { enable = true; type = "fcitx5"; fcitx5 = { waylandFrontend = true; settings = { globalOptions.Hotkey = { TriggerKey = "Control+space"; }; inputMethod = { GroupOrder."0" = "Default"; "Groups/0" = { Name = "Default"; "Default Layout" = "us"; DefaultIM = "mozc"; }; "Groups/0/Items/0" = { Name = "keyboard-us"; Layout = "us"; }; "Groups/0/Items/1" = { Name = "mozc"; Layout = ""; }; "Groups/0/Items/2" = { Name = "keyboard-no"; Layout = "no"; }; }; }; addons = with pkgs; [ fcitx5-rime fcitx5-mozc fcitx5-gtk qt6Packages.fcitx5-configtool ]; }; }; # Ensure fcitx5 starts with the session services.xserver.desktopManager.runXdgAutostartIfNone = true; # environment.sessionVariables = { # GTK_IM_MODULE = lib.mkForce ""; # }; }