GitHub - nix-community/nixos-generators: Collection of image builders [maintainer=@Lassulus]
nixos-generators - one config, multiple formats
The nixos-generators project allows to take the same NixOS configuration, and
generate outputs for different target formats.
Just put your stuff into the configuration.nix and then call one of the image builders.
For example:
or
nixos-generate -f iso -c /etc/nixos/configuration.nix
it echoes the path to a iso image, which you then can flash onto an usb-stick
or mount & boot in a virtual machine.
Installation
nixos-generators is part of nixpkgs and ...
Read more at github.com