If in impure mode
nix-build build.nix ./result
Results in a file called c.img
If in pure mode
nix-build ls -la ./result
Results in a symlink to the image in the nix store