mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 22:20:51 +00:00
30 lines
626 B
Nix
30 lines
626 B
Nix
{ config, pkgs, ... }:
|
|
|
|
with pkgs.lib;
|
|
|
|
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 &";
|
|
};
|
|
}
|