Files
2026-05-31 16:21:43 +08:00

50 lines
1.0 KiB
Nix

{ config, pkgs, ... }:
{
home.packages = with pkgs; [
rime-ice
];
home.file.".local/share/fcitx5/rime/default.custom.yaml".text = ''
patch:
schema_list:
- schema: rime_ice
menu/page_size: 7
'';
xdg.configFile."fcitx5/profile" = {
force = true;
text = ''
[Groups/0]
Name=Default
Default Layout=us
DefaultIM=keyboard-us
[Groups/0/Items/0]
Name=keyboard-us
Layout=
[Groups/0/Items/1]
Name=rime
Layout=
[GroupOrder]
0=Default
'';
};
home.activation.setupRimeIce = config.lib.dag.entryAfter [ "writeBoundary" ] ''
RIME_DIR="$HOME/.local/share/fcitx5/rime"
mkdir -p "$RIME_DIR"
for item in ${pkgs.rime-data}/share/rime-data/*; do
name=$(basename "$item")
[ -e "$RIME_DIR/$name" ] || ln -sf "$item" "$RIME_DIR"
done
for item in ${pkgs.rime-ice}/share/rime-data/*; do
name=$(basename "$item")
[ -e "$RIME_DIR/$name" ] && rm -rf "$RIME_DIR/$name"
ln -sf "$item" "$RIME_DIR"
done
'';
}