From 82694edc4faafd7622b802ca5845a0217c00e32a Mon Sep 17 00:00:00 2001 From: Elec3137 Date: Wed, 1 Apr 2026 10:33:45 -0700 Subject: [PATCH] fix(defaults/jp): fix fcitx.addons not applying --- defaults/jp.nix | 73 +++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/defaults/jp.nix b/defaults/jp.nix index 93b99bd..16c984b 100644 --- a/defaults/jp.nix +++ b/defaults/jp.nix @@ -16,46 +16,49 @@ in config = lib.mkIf cfg.enable { # for typing in japanese - i18n.inputMethod = lib.mkDefault { + i18n.inputMethod = { # set this for the defaults to be realized! # enable = true; - type = "fcitx5"; + type = lib.mkDefault "fcitx5"; fcitx5 = { - waylandFrontend = true; - addons = with pkgs; [ - fcitx5-mozc # japanese module - fcitx5-gtk - ]; + waylandFrontend = lib.mkDefault true; + addons = + with pkgs; + lib.mkIf config.nixowos.allowAddingPackages [ + fcitx5-mozc # japanese module + fcitx5-gtk + ]; - settings.globalOptions = { - # also require "alt" for triggering IME - # this is to avoid conflicts with other apps/games - "Hotkey/TriggerKeys"."0" = "Control+Alt+space"; + settings = lib.mkDefault { + globalOptions = { + # also require "alt" for triggering IME + # this is to avoid conflicts with other apps/games + "Hotkey/TriggerKeys"."0" = "Control+Alt+space"; + }; + + # basic configuration for switching between normal mode and mozc + inputMethod = { + "Groups/0" = { + Name = "Default"; + "Default Layout" = "us"; + DefaultIM = "mozc"; + }; + + "Groups/0/Items/0" = { + Name = "keyboard-us"; + Layout = "us"; + }; + + "Groups/0/Items/1" = { + Name = "mozc"; + Layout = "us"; + }; + + GroupOrder."0" = "Default"; + }; + + addons.classicui.globalSection.Theme = lib.mkIf config.services.desktopManager.plasma6.enable "plasma"; }; - - # basic configuration for switching between normal mode and mozc - settings.inputMethod = { - "Groups/0" = { - Name = "Default"; - "Default Layout" = "us"; - DefaultIM = "mozc"; - }; - - "Groups/0/Items/0" = { - Name = "keyboard-us"; - Layout = "us"; - }; - - "Groups/0/Items/1" = { - Name = "mozc"; - Layout = "us"; - }; - - GroupOrder."0" = "Default"; - }; - - settings.addons.classicui.globalSection.Theme = - lib.mkIf config.services.desktopManager.plasma6.enable "plasma"; }; }; };