ibus: rewrite NixOS module
This commit is contained in:
parent
cb10990fdc
commit
d30a128467
|
@ -9,6 +9,17 @@ let
|
||||||
name = "ibus-engine";
|
name = "ibus-engine";
|
||||||
check = x: (lib.types.package.check x) && (attrByPath ["meta" "isIbusEngine"] false x);
|
check = x: (lib.types.package.check x) && (attrByPath ["meta" "isIbusEngine"] false x);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ibusAutostart = pkgs.writeTextFile {
|
||||||
|
name = "autostart-ibus-daemon";
|
||||||
|
destination = "/etc/xdg/autostart/ibus-daemon.desktop";
|
||||||
|
text = ''
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=IBus
|
||||||
|
Type=Application
|
||||||
|
Exec=${ibusPackage}/bin/ibus-daemon -dx
|
||||||
|
'';
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
@ -27,17 +38,14 @@ in
|
||||||
|
|
||||||
config = mkIf (config.i18n.inputMethod.enabled == "ibus") {
|
config = mkIf (config.i18n.inputMethod.enabled == "ibus") {
|
||||||
# Without dconf enabled it is impossible to use IBus
|
# Without dconf enabled it is impossible to use IBus
|
||||||
environment.systemPackages = [ ibusPackage pkgs.gnome3.dconf ];
|
environment.systemPackages = with pkgs; [
|
||||||
|
ibusPackage ibus-qt gnome3.dconf ibusAutostart
|
||||||
gtkPlugins = [ pkgs.ibus ];
|
];
|
||||||
qtPlugins = [ pkgs.ibus-qt ];
|
|
||||||
|
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
GTK_IM_MODULE = "ibus";
|
GTK_IM_MODULE = "ibus";
|
||||||
QT_IM_MODULE = "ibus";
|
QT_IM_MODULE = "ibus";
|
||||||
XMODIFIERS = "@im=ibus";
|
XMODIFIERS = "@im=ibus";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver.displayManager.sessionCommands = "${ibusPackage}/bin/ibus-daemon --daemonize --xim --cache=none";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user