In the amazing nixos, it is possible to launch a lightweight container that will run a system whose
configuration.nix file is different from the host configuration by using:
nixos-rebuild build-vm -I nixos-config=./configuration.nix
However, this command cannot work on operating systems where nixos is not installed, like debian + nixpkgs, because
nixos-rebuild does not exists.
How can I still use
build-vm in non-nixos systems?