summary refs log tree commit diff
path: root/nixos/modules/i18n/input-method/ibus.nix
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2017-01-20 18:50:52 -0600
committerThomas Tuegel <ttuegel@gmail.com>2017-01-20 18:51:29 -0600
commit1e266dac0d98368c8f253341fb175f1b65f402e3 (patch)
tree78e7a9ad726aa7926764a9b8405edacbeafb2f14 /nixos/modules/i18n/input-method/ibus.nix
parentc7d49e5f6940d10d81523e9cbb62788485a205b6 (diff)
downloadnixpkgs-1e266dac0d98368c8f253341fb175f1b65f402e3.tar
nixpkgs-1e266dac0d98368c8f253341fb175f1b65f402e3.tar.gz
nixpkgs-1e266dac0d98368c8f253341fb175f1b65f402e3.tar.bz2
nixpkgs-1e266dac0d98368c8f253341fb175f1b65f402e3.tar.lz
nixpkgs-1e266dac0d98368c8f253341fb175f1b65f402e3.tar.xz
nixpkgs-1e266dac0d98368c8f253341fb175f1b65f402e3.tar.zst
nixpkgs-1e266dac0d98368c8f253341fb175f1b65f402e3.zip
ibus: make panel configurable
Diffstat (limited to 'nixos/modules/i18n/input-method/ibus.nix')
-rw-r--r--nixos/modules/i18n/input-method/ibus.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/i18n/input-method/ibus.nix b/nixos/modules/i18n/input-method/ibus.nix
index e23e28aa25e..3eaf9e2ab37 100644
--- a/nixos/modules/i18n/input-method/ibus.nix
+++ b/nixos/modules/i18n/input-method/ibus.nix
@@ -10,6 +10,11 @@ let
     check = x: (lib.types.package.check x) && (attrByPath ["meta" "isIbusEngine"] false x);
   };
 
+  impanel =
+    if cfg.panel != null
+    then "--panel=${cfg.panel}"
+    else "";
+
   ibusAutostart = pkgs.writeTextFile {
     name = "autostart-ibus-daemon";
     destination = "/etc/xdg/autostart/ibus-daemon.desktop";
@@ -17,7 +22,7 @@ let
       [Desktop Entry]
       Name=IBus
       Type=Application
-      Exec=${ibusPackage}/bin/ibus-daemon --daemonize --xim
+      Exec=${ibusPackage}/bin/ibus-daemon --daemonize --xim ${impanel}
     '';
   };
 in
@@ -36,6 +41,12 @@ in
           in
             "Enabled IBus engines. Available engines are: ${engines}.";
       };
+      panel = mkOption {
+        type = with types; nullOr path;
+        default = null;
+        example = literalExample "${pkgs.kde5.plasma-desktop}/lib/libexec/kimpanel-ibus-panel";
+        description = "Replace the IBus panel with another panel.";
+      };
     };
   };