nixpkgs/nixos/modules/programs/uim.nix

32 lines
628 B
Nix
Raw Normal View History

2014-09-29 15:45:59 +02:00
{ config, pkgs, lib, ... }:
2014-09-29 15:45:59 +02:00
with lib;
let
cfg = config.uim;
in
{
options = {
2015-03-02 17:06:05 +01:00
uim = {
enable = mkOption {
type = types.bool;
default = false;
example = true;
2015-03-02 17:06:05 +01:00
description = "Enable UIM input method";
};
};
2015-03-02 17:06:05 +01:00
};
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 &";
};
}