input-output-hk / cicero

event-driven automation for Nomad
https://handbook.cicero.ci.iog.io
41 stars 11 forks source link

Clean up the Nix evaluator #46

Closed manveru closed 2 years ago

manveru commented 2 years ago

This now first transforms the environment variables to an attrset using nix-instantiate, and then passes it to nix eval. This allows for use of the evaluation cache and IMHO cleaner code. The script is now also in its own file so we don't have to worry about two stages of interpolation and get instant shellcheck feedback. Also fixed a few shellcheck issues and use the awesome writeShellApplication.