拆分 Home Manager 程序配置

This commit is contained in:
2026-05-30 22:55:47 +08:00
parent 66f91f8506
commit 272d6402ad
7 changed files with 116 additions and 95 deletions
+45
View File
@@ -0,0 +1,45 @@
{ config, pkgs, ... }:
{
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
'';
}