How do I generate a YAML list in a nix module?
There is a toYAML function in nixpkgs (pkgs.lib.generators.toYAML) but it’s the same as the toJSON function which works since YAML is a superset of JSON.
If you feel like you want human-readable YAML, you can pass the output of toJSON to remarshal’s json2yaml. This is what we’re doing in the Home Assistant module.
I didn’t know json wasn’t human-readable.