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 =
let
lib.optionalFile = p: f: v: lib.optionalAttrs (v != { }) {
optionalFile = p: f: v: lib.optionalAttrs (v != { }) {
"xdg/fcitx5/${p}".text = f v;
};
in
lib.attrsets.mergeAttrsList [
(lib.optionalFile "config" (lib.generators.toINI { }) cfg.settings.globalOptions)
(lib.optionalFile "profile" (lib.generators.toINI { }) cfg.settings.inputMethod)
(optionalFile "config" (lib.generators.toINI { }) cfg.settings.globalOptions)
(optionalFile "profile" (lib.generators.toINI { }) cfg.settings.inputMethod)
(lib.concatMapAttrs
(name: value: lib.optionalFile
(name: value: optionalFile
"conf/${name}.conf"
(lib.generators.toINIWithGlobalSection { })
value)