Searching for format conversion documentation (e.g nix-to-toml etc.)

I’m trying to configure Zellij using KDL. I believe there exists a nix-to-kdl parser. However, I’m struggling to generate certain KDL constructs using nix.

Where can I obtain documentation for the KDL format conversion in NixOS? Is there a general repository containing conversion details for nix-to-toml, nix-to-yaml and other formats? I’m getting a little tired of just poking around, hoping something works.

Thank you!

NOTE: I originally posted this on reddit, but it appears to have been lost in other discussion. I will repost any working solutions there.

2 Likes

nix-to-{to,ya}ml is available in Nixpkgs:

https://noogle.dev/f/pkgs/writers/writeTOML

https://noogle.dev/f/pkgs/writers/writeYAML

However I never heard of KDL as a format used in Nixpkgs. Indeed it would be a nice addition to Nixpkgs!

1 Like

There is no KDL conversion in NixOS; it’s implemented in home-manager here: home-manager/modules/lib/generators.nix at 635563f245309ef5320f80c7ebcb89b2398d2949 · nix-community/home-manager · GitHub

2 Likes