diff --git a/modules/workflows.nix b/modules/workflows.nix index 03eb6a0..711e407 100644 --- a/modules/workflows.nix +++ b/modules/workflows.nix @@ -25,34 +25,29 @@ let str ; + inherit (pkgs) action-validator remarshal runCommand; + cfg = config; generate = name: value: - pkgs.callPackage ( + runCommand "${name}.yaml" { - runCommand, - remarshal, - action-validator, - }: - runCommand "${name}.yaml" - { - nativeBuildInputs = [ - action-validator - remarshal - ]; + nativeBuildInputs = [ + action-validator + remarshal + ]; - value = builtins.toJSON value; - passAsFile = [ "value" ]; - preferLocalBuild = true; - } - '' - json2yaml "$valuePath" "$out" + value = builtins.toJSON value; + passAsFile = [ "value" ]; + preferLocalBuild = true; + } + '' + json2yaml "$valuePath" "$out" - # Check that the workflow is valid - cd "${cfg.rootSrc}" && action-validator "$out" - '' - ) { }; + # Check that the workflow is valid + cd "${cfg.rootSrc}" && action-validator "$out" + ''; install = name: value: