diff options
author | Thomas Tuegel <ttuegel@gmail.com> | 2016-02-26 18:07:29 -0600 |
---|---|---|
committer | Thomas Tuegel <ttuegel@gmail.com> | 2016-02-26 18:08:48 -0600 |
commit | d30a1284677ebf2d74e00591811fb2a1b74f13d4 (patch) | |
tree | c09a8c8d207bfaf7c7b3da39872fba3ea7f3ebe6 /nixos/modules/i18n | |
parent | cb10990fdc2f1b671390a2f1b1b11b3362dd9f1d (diff) |
ibus: rewrite NixOS module
Diffstat (limited to 'nixos/modules/i18n')
-rw-r--r-- | nixos/modules/i18n/inputMethod/ibus.nix | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/nixos/modules/i18n/inputMethod/ibus.nix b/nixos/modules/i18n/inputMethod/ibus.nix index 86059751a3d2..5d01311c91bd 100644 --- a/nixos/modules/i18n/inputMethod/ibus.nix +++ b/nixos/modules/i18n/inputMethod/ibus.nix @@ -9,6 +9,17 @@ let name = "ibus-engine"; 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 { options = { @@ -27,17 +38,14 @@ in config = mkIf (config.i18n.inputMethod.enabled == "ibus") { # Without dconf enabled it is impossible to use IBus - environment.systemPackages = [ ibusPackage pkgs.gnome3.dconf ]; - - gtkPlugins = [ pkgs.ibus ]; - qtPlugins = [ pkgs.ibus-qt ]; + environment.systemPackages = with pkgs; [ + ibusPackage ibus-qt gnome3.dconf ibusAutostart + ]; environment.variables = { GTK_IM_MODULE = "ibus"; QT_IM_MODULE = "ibus"; XMODIFIERS = "@im=ibus"; }; - - services.xserver.displayManager.sessionCommands = "${ibusPackage}/bin/ibus-daemon --daemonize --xim --cache=none"; }; } |