about summary refs log tree commit diff
path: root/nixos/modules/i18n
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2016-02-16 23:01:03 +0900
committerEric Sagnes <eric.sagnes@gmail.com>2016-02-17 20:44:29 +0900
commit3ed3f061dad30f9ae8b7712b0b46140b415d4ab3 (patch)
treecd4cbe202ee4de4652863770bbd1e82293924b02 /nixos/modules/i18n
parent4a199d99552046e2ffd743d501d4ee4696038b42 (diff)
downloadnixlib-3ed3f061dad30f9ae8b7712b0b46140b415d4ab3.tar
nixlib-3ed3f061dad30f9ae8b7712b0b46140b415d4ab3.tar.gz
nixlib-3ed3f061dad30f9ae8b7712b0b46140b415d4ab3.tar.bz2
nixlib-3ed3f061dad30f9ae8b7712b0b46140b415d4ab3.tar.lz
nixlib-3ed3f061dad30f9ae8b7712b0b46140b415d4ab3.tar.xz
nixlib-3ed3f061dad30f9ae8b7712b0b46140b415d4ab3.tar.zst
nixlib-3ed3f061dad30f9ae8b7712b0b46140b415d4ab3.zip
nabi service: init
Diffstat (limited to 'nixos/modules/i18n')
-rw-r--r--nixos/modules/i18n/inputMethod/nabi.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/nixos/modules/i18n/inputMethod/nabi.nix b/nixos/modules/i18n/inputMethod/nabi.nix
new file mode 100644
index 000000000000..7f97135fee1e
--- /dev/null
+++ b/nixos/modules/i18n/inputMethod/nabi.nix
@@ -0,0 +1,37 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+let 
+  cfg = config.i18n.inputMethod.nabi;
+in
+{
+  options = {
+
+    i18n.inputMethod.nabi = {
+      enable = mkOption {
+        type    = types.bool;
+        default = false;
+        example = true;
+        description = ''
+          Enable nabi input method.
+          Nabi can be used to input Korean.
+        '';
+      };
+    };
+
+  };
+{
+  config = mkIf cfg.enable {
+    environment.systemPackages = [ pkgs.nabi ];
+    qtPlugins  = [ pkgs.nabi ];
+
+    environment.variables = {
+      GTK_IM_MODULE = "nabi";
+      QT_IM_MODULE  = "nabi";
+      XMODIFIERS    = "@im=nabi";
+    };
+
+    services.xserver.displayManager.sessionCommands = "${pkgs.nabi}/bin/nabi &";
+  };
+}