From 3912c447ee2ca698a599942c61577299bdbb2a6c Mon Sep 17 00:00:00 2001 From: Evy Garden Date: Fri, 9 Jan 2026 18:53:30 +0100 Subject: [PATCH] lib.generators.toKDL: fix _children not being applied on root level --- modules/lib/generators.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/lib/generators.nix b/modules/lib/generators.nix index d92114b9..6e0b8774 100644 --- a/modules/lib/generators.nix +++ b/modules/lib/generators.nix @@ -203,7 +203,15 @@ else if vType == "set" then convertAttrsToKDL name value else if vType == "list" then - convertListToKDL name value + if name == "_children" then + concatStringsSep "\n" ( + map (lib.flip lib.pipe [ + (mapAttrsToList convertAttributeToKDL) + (concatStringsSep "\n") + ]) value + ) + else + convertListToKDL name value else throw '' Cannot convert type `(${typeOf value})` to KDL: