2014-09-29 15:45:59 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
2014-07-13 08:46:34 +02:00
|
|
|
|
2014-09-29 15:45:59 +02:00
|
|
|
with lib;
|
2014-07-13 08:46:34 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.uim;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
uim = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "enable UIM input method";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ pkgs.uim ];
|
|
|
|
gtkPlugins = [ pkgs.uim ];
|
|
|
|
qtPlugins = [ pkgs.uim ];
|
|
|
|
environment.variables.GTK_IM_MODULE = "uim";
|
|
|
|
environment.variables.QT_IM_MODULE = "uim";
|
|
|
|
environment.variables.XMODIFIERS = "@im=uim";
|
|
|
|
services.xserver.displayManager.sessionCommands = "uim-xim &";
|
|
|
|
};
|
|
|
|
}
|