3 ms·
> If you want config-as-code (and you want to!), just do it properly and use a proper programming language for it. Don't care which one, be it JavaScript, Pytho
by RGBCube 3y ago
> If you want config-as-code (and you want to!), just do it properly and use a proper programming language for it. Don't care which one, be it JavaScript, Python, Go, PDP-11 Assembly, or Rust. But please stop with these half-measure DSLs that just don't cut it.
I wish more tooling used Nix, it's a great lisp that isn't ugly.
- Y_Y 3y agoNix, the language? It's very good for derivations (big, composed k:v maps), but it doesn't feel like a lisp, nor would I want to try using it for docker-compose or a config for pre-commit or an omega one description of an ML model parameterisation. Then again I'd love to be shown that this partially-considered opinion is wrong. (Also, isn't Nix's inadequacy as a lisp one of the reasons for the existence of Guix?)
- otabdeveloper4 3y agoNix is JSON + arrow functions + variables. The only difference between Nix and a hypothetical JSON++ is that Nix is lazy by default. I.e., it is nothing at all like any Lisp.
- m45t3r 3y agoI actually use Nix to generate YAML files for GitHub Actions in one of my repositories. It allows me to share code between multiple actions and be consistent with versions/formatting.
- RGBCube 3y agoThat's a really nice use case! Could you provide a link?
- m45t3r 3y agoSorry, didn't see this comment. It is here: https://github.com/thiagokokada/nix-configs https://github.com/thiagokokada/nix-configs In the `actions` directory is all the Nix files. There is some glue code in `lib/flakes` to generate the YAML files from Nix.