mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
Reviewed-on: https://codeberg.org/leana8959/.files/pulls/25 Co-authored-by: Léana 江 <leana.jiang+git@icloud.com> Co-committed-by: Léana 江 <leana.jiang+git@icloud.com>
27 lines
753 B
Nix
27 lines
753 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.i18n.inputMethod;
|
|
in
|
|
{
|
|
i18n.inputMethod = {
|
|
fcitx5.addons = [
|
|
pkgs.qt6Packages.fcitx5-chinese-addons
|
|
pkgs.fcitx5-table-extra
|
|
];
|
|
};
|
|
|
|
# Note:
|
|
# fcitx5, when wrapped with nix, will keep pointing to the configuration in the nix store.
|
|
# In order to change the configuration, you need to:
|
|
# - kill the existing fcitx5 process because the configtool kinda talks to it (?)
|
|
# - unlink the configuration file linked by home-manager (or copy it) so fcitx5-configtool can write to it
|
|
# - use fcitx5-configtool from a nix shell so that it doesn't get stuck with the nix store configuration
|
|
xdg.configFile = lib.mkIf cfg.enable {
|
|
"fcitx5".source = "${./fcitx}";
|
|
};
|
|
}
|