简化stable/unstable切换的方式;增加兼容性代码,根据版本引用

This commit is contained in:
2025-05-05 18:59:34 +08:00
parent e6891f9f8e
commit c133e5637f
12 changed files with 113 additions and 93 deletions

View File

@@ -1,16 +1,21 @@
# 输入法配置模块
{ config, lib, pkgs, ... }: {
i18n.inputMethod = {
i18n.inputMethod = (if lib.versionAtLeast config.home.stateVersion "25.05" then {
enable = true;
type = "fcitx5";
} else {
enabled = "fcitx5";
}) // {
fcitx5 = {
addons = with pkgs; [
fcitx5-gtk
fcitx5-chinese-addons
fcitx5-nord
];
waylandFrontend = true; # available in home-manager-25.05
};
} // (lib.optionalAttrs (lib.versionAtLeast config.home.stateVersion "25.05") {
waylandFrontend = true;
});
};
gtk = {