change fcitx5 config to pkg, use rime-ice default config.

This commit is contained in:
Ulic-youthlic 2025-01-10 18:44:38 +08:00
parent 445dfe6543
commit 424afb3ad4
4 changed files with 14 additions and 49 deletions

View file

@ -10,7 +10,6 @@
imports = [ imports = [
./starship ./starship
./fish ./fish
./rime-ice.nix
./firefox.nix ./firefox.nix
./foot ./foot
./ghostty ./ghostty

View file

@ -1,40 +0,0 @@
{ ... }:
{
xdg.dataFile = {
"fcitx5/rime/default.custom.yaml".text = ''
patch:
__include: rime_ice_suggestion:/
schema_list:
- schema: double_pinyin_flypy
'';
"fcitx5/rime/rime_ice.custom.yaml".text = ''
patch:
"translator/dictionary": custom_dict
'';
"fcitx5/rime/custom_dict.dict.yaml".text = ''
# Rime dictionary
# encoding: utf-8
---
name: custom_dict
version: "1.0"
sort: by_weight
use_preset_vocabulary: false
import_tables:
# https://github.com/iDvel/rime-ice/blob/main/rime_ice.dict.yaml
- cn_dicts/8105 # 字表
- cn_dicts/41448 # 大字表(按需启用)(启用时和 8105 同时启用并放在 8105 下面)
- cn_dicts/base # 基础词库
- cn_dicts/ext # 扩展词库
- cn_dicts/tencent # 腾讯词向量(大词库,部署时间较长)
- cn_dicts/others # 一些杂项
- zhwiki
- moegirl
...
'';
};
}

View file

@ -27,15 +27,12 @@
fcitx5-configtool fcitx5-configtool
fcitx5-chinese-addons fcitx5-chinese-addons
(fcitx5-rime.override { (fcitx5-rime.override {
rimeDataPkgs = rimeDataPkgs = (
with (outputs.packages."${pkgs.system}");
[ [
rime-data
]
++ (with (outputs.packages."${pkgs.system}"); [
rime-ice rime-ice
rime-zhwiki ]
rime-moegirl );
]);
}) })
]; ];
waylandFrontend = true; waylandFrontend = true;

View file

@ -11,5 +11,14 @@
let let
nur-xddxdd = (pkgs.callPackage "${inputs.nur-xddxdd}/default.nix" { }); nur-xddxdd = (pkgs.callPackage "${inputs.nur-xddxdd}/default.nix" { });
in in
pkgs.lib.genAttrs [ "rime-ice" "rime-zhwiki" "rime-moegirl" ] (name: nur-xddxdd."${name}") pkgs.lib.genAttrs [ "rime-zhwiki" "rime-moegirl" ] (name: nur-xddxdd."${name}")
// {
rime-ice = nur-xddxdd.rime-ice.overrideAttrs {
buildPhase = ''
runHook preBuild
runHook postBuild
'';
};
}
) )