mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
32 lines
628 B
Nix
32 lines
628 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
with 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 &";
|
|
};
|
|
}
|