diff options
author | Nick Cao <nickcao@nichi.co> | 2024-01-04 15:06:58 -0500 |
---|---|---|
committer | Nick Cao <nickcao@nichi.co> | 2024-01-04 15:06:58 -0500 |
commit | 75b9953dafe790f707fae4256d0ae3a0eb8766fb (patch) | |
tree | 79b175356e185d79b174967503d14817d01ceb2d /nixos/modules | |
parent | 7a7cfff8915e06365bc2365ff33d4d413184fa9f (diff) | |
download | nixlib-75b9953dafe790f707fae4256d0ae3a0eb8766fb.tar nixlib-75b9953dafe790f707fae4256d0ae3a0eb8766fb.tar.gz nixlib-75b9953dafe790f707fae4256d0ae3a0eb8766fb.tar.bz2 nixlib-75b9953dafe790f707fae4256d0ae3a0eb8766fb.tar.lz nixlib-75b9953dafe790f707fae4256d0ae3a0eb8766fb.tar.xz nixlib-75b9953dafe790f707fae4256d0ae3a0eb8766fb.tar.zst nixlib-75b9953dafe790f707fae4256d0ae3a0eb8766fb.zip |
nixos/fcitx5: allow using the wayland frontend instead of the fcitx5 one
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/i18n/input-method/fcitx5.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/nixos/modules/i18n/input-method/fcitx5.nix b/nixos/modules/i18n/input-method/fcitx5.nix index 3d52c08888ea..530727f3f292 100644 --- a/nixos/modules/i18n/input-method/fcitx5.nix +++ b/nixos/modules/i18n/input-method/fcitx5.nix @@ -19,6 +19,14 @@ in Enabled Fcitx5 addons. ''; }; + waylandFrontend = mkOption { + type = types.bool; + default = false; + description = lib.mdDoc '' + Use the Wayland input method frontend. + See [Using Fcitx 5 on Wayland](https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland). + ''; + }; quickPhrase = mkOption { type = with types; attrsOf str; default = { }; @@ -118,10 +126,11 @@ in ]; environment.variables = { - GTK_IM_MODULE = "fcitx"; - QT_IM_MODULE = "fcitx"; XMODIFIERS = "@im=fcitx"; QT_PLUGIN_PATH = [ "${fcitx5Package}/${pkgs.qt6.qtbase.qtPluginPrefix}" ]; + } // lib.optionalAttrs (!cfg.waylandFrontend) { + GTK_IM_MODULE = "fcitx"; + QT_IM_MODULE = "fcitx"; } // lib.optionalAttrs cfg.ignoreUserConfig { SKIP_FCITX_USER_PATH = "1"; }; |