nix-community / nixago

Generate configuration files using Nix [maintainer=@jmgilman]
https://nix-community.github.io/nixago
MIT License
124 stars 6 forks source link

Add support for Dhall #26

Open jmgilman opened 2 years ago

jmgilman commented 2 years ago

Add support for the Dhall language.

jmgilman commented 2 years ago

It appears that we can follow the same path taken with CUE in exporting the Nix expression JSON. This gets fed to json-to-dhall to produce a Dhall file. We could name this something static, like data.dhall, and then have downstream users ingest it into their own files (i.e. let data = ./data.dhall). Finally, convert to the desired format.

  1. Export Nix expression to JSON
  2. Convert JSON to Dhall
  3. Import Dhall
  4. Perform logic and then export to desired format (i.e. JSON, YAML, etc.)