Skip to content

Comment on Json2dir: a JSON-to-directory converter, a fast alternative to home-manager

Comments

I don't think json is the right language for this. You can't really have comments, and your scripts have to be in a single line (because json doesn't support multi-line strings).

alurmOP

Yes, but you can generate JSON with other tools easily. home.md describes how you can do it with Nix, but just as easily you can use Cue or something else.

Edit: mentioned this in the README explicitly. Thanks!

You could at least use Hujson[0], which adds comments and trailing commas; makes for a more convenient editing experience, at the price of an additional parsing step.

[0]: https://github.com/tailscale/hujson

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.