It seems Vim needs to be instructed how to scan for the begining of the multiline statements to correctly and efficiently highlight lanuages. See :help syn-sync-maxlines
Nixpkgs is a collection of packages for Nix package manager. Nixpkgs also includes NixOS linux distribution source code.