feat: add stylix theme

Break Changes:
- May need reconfigure fcitx5 input method
This commit is contained in:
danny 2025-08-20 22:32:44 +08:00
parent ca73fac1f6
commit d1913a50ae
30 changed files with 621 additions and 531 deletions

View file

@ -0,0 +1,59 @@
{
pkgs,
config,
lib,
...
}:
let
addons = with pkgs; [
fcitx5-gtk
fcitx5-mozc # Japanese
fcitx5-chinese-addons
fcitx5-rime # Bopomofo
rime-data
];
in
{
i18n = {
inputMethod = {
enable = true;
type = "fcitx5";
fcitx5 = {
inherit addons;
waylandFrontend = true;
settings = {
addons.classicui.globalSection =
let
font = "Noto Sans CJK TC ${toString config.stylix.fonts.sizes.popups}";
in
{
Font = lib.mkForce font;
MenuFont = lib.mkForce font;
TrayFont = lib.mkForce font;
};
};
};
};
};
systemd.user.services.fcitx5 = {
Unit = {
WantedBy = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
Description = "Fcitx5 Input Method";
};
Service = {
Type = "simple";
Restart = "always";
RestartSec = 2;
ExecStart = "${pkgs.fcitx5}/bin/fcitx5";
Environment = [
"GTK_IM_MODULE="
"XMODIFIERS=@im=fcitx"
"QT_IM_MODULE=fcitx"
];
};
};
}