mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00

After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
84 lines
1.7 KiB
Nix
84 lines
1.7 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
generators,
|
|
...
|
|
}:
|
|
let
|
|
imcfg = config.i18n.inputMethod;
|
|
in
|
|
{
|
|
imports = [
|
|
(lib.mkRemovedOptionModule [
|
|
"i18n"
|
|
"inputMethod"
|
|
"kime"
|
|
"config"
|
|
] "Use i18n.inputMethod.kime.* instead")
|
|
];
|
|
|
|
options.i18n.inputMethod.kime = {
|
|
daemonModules = lib.mkOption {
|
|
type = lib.types.listOf (
|
|
lib.types.enum [
|
|
"Xim"
|
|
"Wayland"
|
|
"Indicator"
|
|
]
|
|
);
|
|
default = [
|
|
"Xim"
|
|
"Wayland"
|
|
"Indicator"
|
|
];
|
|
example = [
|
|
"Xim"
|
|
"Indicator"
|
|
];
|
|
description = ''
|
|
List of enabled daemon modules
|
|
'';
|
|
};
|
|
iconColor = lib.mkOption {
|
|
type = lib.types.enum [
|
|
"Black"
|
|
"White"
|
|
];
|
|
default = "Black";
|
|
example = "White";
|
|
description = ''
|
|
Color of the indicator icon
|
|
'';
|
|
};
|
|
extraConfig = lib.mkOption {
|
|
type = lib.types.lines;
|
|
default = "";
|
|
description = ''
|
|
extra kime configuration. Refer to <https://github.com/Riey/kime/blob/v${pkgs.kime.version}/docs/CONFIGURATION.md> for details on supported values.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf (imcfg.enable && imcfg.type == "kime") {
|
|
i18n.inputMethod.package = pkgs.kime;
|
|
|
|
environment.variables = {
|
|
GTK_IM_MODULE = "kime";
|
|
QT_IM_MODULE = "kime";
|
|
XMODIFIERS = "@im=kime";
|
|
};
|
|
|
|
environment.etc."xdg/kime/config.yaml".text =
|
|
''
|
|
daemon:
|
|
modules: [${lib.concatStringsSep "," imcfg.kime.daemonModules}]
|
|
indicator:
|
|
icon_color: ${imcfg.kime.iconColor}
|
|
''
|
|
+ imcfg.kime.extraConfig;
|
|
};
|
|
|
|
# uses attributes of the linked package
|
|
meta.buildDocsInSandbox = false;
|
|
}
|