From 051b74fe7d7398c24fee4d703bd1e32a88b68393 Mon Sep 17 00:00:00 2001 From: Vonfry Date: Sun, 12 Mar 2023 12:03:50 +0800 Subject: nixos/fcitx: deprecated, and suggestions to use fcitx5 instead --- nixos/modules/i18n/input-method/default.nix | 5 ++-- nixos/modules/i18n/input-method/fcitx.nix | 46 ----------------------------- 2 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 nixos/modules/i18n/input-method/fcitx.nix (limited to 'nixos/modules/i18n/input-method') diff --git a/nixos/modules/i18n/input-method/default.nix b/nixos/modules/i18n/input-method/default.nix index 5f803b4f2ee79..d967d4335c70c 100644 --- a/nixos/modules/i18n/input-method/default.nix +++ b/nixos/modules/i18n/input-method/default.nix @@ -29,9 +29,9 @@ in options.i18n = { inputMethod = { enabled = mkOption { - type = types.nullOr (types.enum [ "ibus" "fcitx" "fcitx5" "nabi" "uim" "hime" "kime" ]); + type = types.nullOr (types.enum [ "ibus" "fcitx5" "nabi" "uim" "hime" "kime" ]); default = null; - example = "fcitx"; + example = "fcitx5"; description = lib.mdDoc '' Select the enabled input method. Input methods is a software to input symbols that are not available on standard input devices. @@ -40,7 +40,6 @@ in Currently the following input methods are available in NixOS: - ibus: The intelligent input bus, extra input engines can be added using `i18n.inputMethod.ibus.engines`. - - fcitx: A customizable lightweight input method, extra input engines can be added using `i18n.inputMethod.fcitx.engines`. - fcitx5: The next generation of fcitx, addons (including engines, dictionaries, skins) can be added using `i18n.inputMethod.fcitx5.addons`. - nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5. - uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean. diff --git a/nixos/modules/i18n/input-method/fcitx.nix b/nixos/modules/i18n/input-method/fcitx.nix deleted file mode 100644 index 043ec3d55c1f6..0000000000000 --- a/nixos/modules/i18n/input-method/fcitx.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.i18n.inputMethod.fcitx; - fcitxPackage = pkgs.fcitx.override { plugins = cfg.engines; }; - fcitxEngine = types.package // { - name = "fcitx-engine"; - check = x: (lib.types.package.check x) && (attrByPath ["meta" "isFcitxEngine"] false x); - }; -in -{ - options = { - - i18n.inputMethod.fcitx = { - engines = mkOption { - type = with types; listOf fcitxEngine; - default = []; - example = literalExpression "with pkgs.fcitx-engines; [ mozc hangul ]"; - description = - let - enginesDrv = filterAttrs (const isDerivation) pkgs.fcitx-engines; - engines = concatStringsSep ", " - (map (name: "`${name}`") (attrNames enginesDrv)); - in - lib.mdDoc "Enabled Fcitx engines. Available engines are: ${engines}."; - }; - }; - - }; - - config = mkIf (config.i18n.inputMethod.enabled == "fcitx") { - i18n.inputMethod.package = fcitxPackage; - - environment.variables = { - GTK_IM_MODULE = "fcitx"; - QT_IM_MODULE = "fcitx"; - XMODIFIERS = "@im=fcitx"; - }; - services.xserver.displayManager.sessionCommands = "${fcitxPackage}/bin/fcitx"; - }; - - # uses attributes of the linked package - meta.buildDocsInSandbox = false; -} -- cgit 1.4.1