nixos-config/modules/home-manager/i18n.nix
2021-12-06 18:24:27 +08:00

22 lines
589 B
Nix

{ config, options, lib, pkgs, ... }:
let
cfg = config.modules.i18n;
in
{
options.modules.i18n.enable = lib.mkEnableOption "Enable fcitx5 as input method engine.";
config = lib.mkIf cfg.enable {
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-gtk # Add support for GTK-based programs.
libsForQt5.fcitx5-qt # Add support for QT-based programs.
fcitx5-lua # Add Lua support.
fcitx5-rime # Chinese input addon.
fcitx5-mozc # Japanese input addon.
];
};
};
}