No problem:
- Get a copy of nixpkgs:
git clone https://github.com/NixOS/nixpkgs
- Save the snippet to
iso-image.nix
- Adapt the first line of the script that it points to location of
nixpkgs
(from step 1) - run
nix-build iso-image.nix
to build the image. - In the folder
result/
you will find the iso-image, which can write to a USB stick withdd