Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to save all loaded files to a destination and keep directory structure #46

Open
blazp7 opened this issue May 13, 2024 · 0 comments
Open

Comments

@blazp7
Copy link

blazp7 commented May 13, 2024

Hi, im trying to create an ansible project using nix language. I have an entire directory of .nix files that are referencing each other through self, super, root and are structured in ansible compatible hierarchy. Now i would like to save these imported nix expressions to .yaml files in a new directory while keeping the hierarchy structure intact, so i can run ansible-playbook on it.

I was hoping there is some way to iterate over the files that haumena has loaded, with access to their relative filepath and the evaluated expression so i could do something like this (pkgs.formats.yaml {}).generate "path/filename.yml" nixexpr

Help much appreciated and thanks for your work on this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant