Since the logstash config file seemed very similar to a nixexpr, I decided to map directly from nixexprs to logstash configs. I didn't realize until too far in that this solution was probably way over-engineered, but it works.