Skip to content

Use nix2sbom

louib edited this page Aug 28, 2023 · 2 revisions

With flakes

The -f argument can be used to target a specific flake reference. For example, run the following command to generate a SBOM for the default package of the flake in the current directory:

nix2sbom -f .#

On NixOS

The SBOM for the current NixOS system can be obtained with the following command:

nix2sbom --current-system

Serialization Formats

You can use the -s option to change the serialization format. For example:

nix2sbom -f .# -s yaml

Logging

The NIX2SBOM_LOG_LEVEL environment variable can be used to tune the logging level. The accepted values are DEBUG, INFO, WARN and ERROR. The default log level is INFO.

Clone this wiki locally