main
1{lib, ...}: {
2 flake.modules.homeManager.desktop = {pkgs, ...}: let
3 fcitx5-rime = pkgs.fcitx5-rime.override {
4 rimeDataPkgs = [pkgs.nur.repos.xddxdd.rime-ice];
5 };
6 in {
7 i18n.inputMethod = lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
8 enable = true;
9 type = "fcitx5";
10 fcitx5 = {
11 # To fix configtool in plasma6
12 fcitx5-with-addons = pkgs.qt6Packages.fcitx5-with-addons;
13 addons = with pkgs; [
14 fcitx5-rime
15 fcitx5-gtk # gtk im module
16 ];
17 waylandFrontend = true;
18 settings = {
19 inputMethod = {
20 GroupOrder."0" = "Default";
21 "Groups/0" = {
22 Name = "Default";
23 "Default Layout" = "us";
24 DefaultIM = "rime";
25 };
26 "Groups/0/Items/0" = {
27 IM = "rime";
28 Layout = "us";
29 };
30 };
31 globalOptions = {
32 Behavior = {
33 DefaultPageSize = 9;
34 };
35 };
36 };
37 };
38 };
39 };
40}