SecretsYamlBuilder

Pure renderer that turns NixSecretEntry items into the unencrypted YAML sops reads.

  • Single-segment keys (e.g. luks_password) stay FLAT at the root - backward-compatible with the pre-existing luks-only payload.

  • / in a key path nests it: ipfs/swarm_key + ipfs/cluster_secret group under ONE ipfs: map (matching how sops-nix splits secret names).

  • Multiline entries render as a YAML block scalar (|); single-line entries render inline-quoted with \ and " escaped.

public sealed class SecretsYamlBuilder

1. Methods

1.1. Build(IReadOnlyList<NixSecretEntry>)

Renders entries into the plaintext YAML payload.

public string Build(IReadOnlyList<NixSecretEntry> entries)
Table 1. Parameters
Name Type Description

entries

IReadOnlyList<NixSecretEntry>

Returns: string