Is there a straightforward way to export a nickel expression containing a list of my machines to a simple nix expression like you can with json, toml etc? It'd be cool to have my systems defined in a nickel expression then be able to export them to json for my ci/cd pipeline and to nix for my actual build configurations.
let { SystemSchema, .. } = import "system-schema.ncl" in
let { NetworkSchema, .. } = import "../networks/network-schema.ncl" in
let abyslNetworks = import "../networks/networks.ncl" in
{
zitadel | SystemSchema = { host = "zitadel", ip = "10.0.22.2", networks = [ abyslNetworks.public ] },
}
Nix is not a great format for data transfer between systems. I’d recommend exporting data to JSON and loading it from it in Nix using builtins.fromJSON.
Hi,
Is there a straightforward way to export a nickel expression containing a list of my machines to a simple nix expression like you can with json, toml etc? It'd be cool to have my systems defined in a nickel expression then be able to export them to json for my ci/cd pipeline and to nix for my actual build configurations.