nixos-config/home-manager/profiles/fcitx5/default.nix

35 lines
817 B
Nix
Raw Permalink Normal View History

2024-11-28 01:14:34 +08:00
{ pkgs, lib, ... }:
let
fcitx5Package = pkgs.qt6Packages.fcitx5-with-addons.override {
addons = with pkgs; [
qt6Packages.fcitx5-chinese-addons
fcitx5-pinyin-zhwiki
];
withConfigtool = false;
};
in
{
home.packages = lib.singleton fcitx5Package;
systemd.user.services.fcitx5-daemon = {
Unit = {
Description = "Fcitx5 input method editor";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
Requisite = [ "graphical-session.target" ];
};
Service.ExecStart = "${fcitx5Package}/bin/fcitx5";
Install.WantedBy = [ "graphical-session.target" ];
};
xdg.configFile."fcitx5" = {
source = ./_config;
force = true;
recursive = true;
};
2024-12-02 21:08:37 +08:00
systemd.user.sessionVariables = {
QT_IM_MODULE = "fcitx";
};
2024-11-28 01:14:34 +08:00
}