Commit b958962

HPCesia <me@hpcesia.com>
2026-10-07 12:11:30
fcitx5: split rime config to separate yaml files
1 parent 67373bb
Changed files (2)
modules
modules/desktop/ime/rime/default.custom.yaml
@@ -0,0 +1,2 @@
+patch:
+  __include: "rime_frost_suggestion:/"
modules/desktop/ime/fcitx5.nix
@@ -64,7 +64,6 @@
       }: let
         iniFormat = pkgs.formats.ini {};
         iniGlobalFormat = pkgs.formats.iniWithGlobalSection {};
-        yamlFormat = pkgs.formats.yaml {};
 
         normalizeFcitx5Value = value:
           if lib.isAttrs value
@@ -109,12 +108,14 @@
           };
         };
 
-        xdg.data.files."fcitx5/rime/default.custom.yaml" = {
-          generator = yamlFormat.generate "fcitx5-rime-default.custom.conf";
-          value = {
-            patch.__include = "rime_frost_suggestion:/";
-          };
-        };
+        xdg.data.files = builtins.listToAttrs (
+          map (name: {
+            name = "fcitx5/rime/${name}";
+            value = {
+              source = toString ./rime/${name};
+            };
+          }) (builtins.attrNames (builtins.readDir ./rime))
+        );
       };
     };
   };