Files
nix-config/home/linux/fcitx5/default.nix
2023-08-16 23:45:36 +08:00

34 lines
1000 B
Nix

{
pkgs,
config,
lib,
catppuccin-fcitx5,
...
}: {
home.file.".config/fcitx5/profile".source = ./profile;
# color schema
home.file.".local/share/fcitx5/themes".source = "${catppuccin-fcitx5}/src";
home.file.".config/fcitx5/conf/classicui.conf".source = ./classicui.conf;
# every time fcitx5 switch input method, it will modify ~/.config/fcitx5/profile file,
# which will override my config managed by home-manager
# so we need to remove it before everytime we rebuild the config
home.activation.removeExistingFcitx5Profile = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
rm -f "${config.xdg.configHome}/fcitx5/profile"
'';
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [
# for flypy chinese input method
fcitx5-rime
# needed enable rime using configtool after installed
fcitx5-configtool
fcitx5-chinese-addons
# fcitx5-mozc # japanese input method
fcitx5-gtk # gtk im module
];
};
}