Files
samfelag/modules/system/input/japanese.nix
T
2026-11-09 11:24:43 +01:00

59 lines
1.1 KiB
Nix

{ config, lib, pkgs, inputs, ... }:
with lib;
let
cfg = config.samfelag.modules.system.input.japanese;
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
in
{
options.samfelag.modules.system.input.japanese = {
enable = mkEnableOption "Enable japanese input";
};
config = mkIf cfg.enable {
i18n.inputMethod = {
type = "fcitx5";
enable = true;
fcitx5 = {
waylandFrontend = true;
addons = with pkgs; [
fcitx5-mozc-ut
fcitx5-gtk
fcitx5-nord
];
};
};
fonts.packages = with pkgs; [
ipafont
kochi-substitute
noto-fonts-cjk-sans
];
environment.variables = {
# GTK_IM_MODULE = "fcitx";
QT_IM_MODULE = "fcitx";
XMODIFIERS = "@im=fcitx";
};
hm.wayland.windowManager.hyprland.settings = lib.mkIf hyprCfg.enable {
windowrule = [
{
name = "pseudotile-fcitx";
match = {
class = "fcitx";
};
pseudo = true;
}
];
exec-once = [
"fcitx -d -r"
"fcitx-remote -r"
];
};
};
}