From 060d8fad47b51fcaa2319d15279c0b7ef99e7e31 Mon Sep 17 00:00:00 2001 From: technofab Date: Fri, 28 Feb 2025 12:53:17 +0100 Subject: [PATCH] chore(module): slim down pipeline yaml generation even more --- lib/flakeModule.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/flakeModule.nix b/lib/flakeModule.nix index 7c34aa7..7e311de 100644 --- a/lib/flakeModule.nix +++ b/lib/flakeModule.nix @@ -164,12 +164,7 @@ # NOTE: json is also valid yaml and this removes dependency on jq # and/or remarshal (used in pkgs.formats.json and pkgs.formats.yaml # respectively) - toYaml = name: value: - pkgs.runCommand name {} '' - cat <<'EOT' > $out - ${builtins.toJSON value} - EOT - ''; + toYaml = name: value: builtins.toFile name (builtins.toJSON value); mapAttrs = cb: set: builtins.listToAttrs (builtins.map (key: cb key (builtins.getAttr key set)) (builtins.attrNames set)); prepend = key: arr: job: job