LXD is available in nixpkgs and can be enabled with a single line added to configuration.nix. It works well if you want to launch container instances. LXD also supports virtual machine instances. Out of the box, the nixpkg is missing some things to allow this to work.