nixos/fcitx5: fix evaluation

This commit is contained in:
Nick Cao 2024-08-31 09:20:31 -04:00
parent 1b8078befe
commit 38cabf32f8
No known key found for this signature in database

View File

@ -119,15 +119,15 @@ in
]; ];
environment.etc = environment.etc =
let let
lib.optionalFile = p: f: v: lib.optionalAttrs (v != { }) { optionalFile = p: f: v: lib.optionalAttrs (v != { }) {
"xdg/fcitx5/${p}".text = f v; "xdg/fcitx5/${p}".text = f v;
}; };
in in
lib.attrsets.mergeAttrsList [ lib.attrsets.mergeAttrsList [
(lib.optionalFile "config" (lib.generators.toINI { }) cfg.settings.globalOptions) (optionalFile "config" (lib.generators.toINI { }) cfg.settings.globalOptions)
(lib.optionalFile "profile" (lib.generators.toINI { }) cfg.settings.inputMethod) (optionalFile "profile" (lib.generators.toINI { }) cfg.settings.inputMethod)
(lib.concatMapAttrs (lib.concatMapAttrs
(name: value: lib.optionalFile (name: value: optionalFile
"conf/${name}.conf" "conf/${name}.conf"
(lib.generators.toINIWithGlobalSection { }) (lib.generators.toINIWithGlobalSection { })
value) value)