Use nix2sbom
louib edited this page Aug 28, 2023
·
2 revisions
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 .#
The SBOM for the current NixOS system can be obtained with the following command:
nix2sbom --current-system
You can use the -s
option to change the serialization format. For example:
nix2sbom -f .# -s yaml
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
.