Pin vmware version

is there a way to pin current installed version of vmware so i can upgrade channel, do nixos-rebuild switch and dont get errors? (new vmware installs are broken since broadcom adquisition)

thanks

There are many ways to do this - maybe even too many ways, because lots of people have been having fun inventing new ways to do dev environments (which require pinning versions).

Here is the old-skool way, which is what I use myself:

https://wiki.nixos.org/wiki/FAQ/Pinning_Nixpkgs

Spangly posh new alternatives include npins. Personally, I don’t know how to use it with configuration.nix but I’m guessing it’s not difficult and it’s probably more future-proof than the old way:

but the problem is that vmware is a service not a package.

virtualisation.vmware.host.enable =true;

Sure, but there’s a virtualisation.vmware.host.package option which you can explicitly set.

yes, but how can I can find the version I currently have, and pin it to virtualisation.vmware.host.package

as I see it in options
virtualisation.vmware.host.package = pkgs.vmware-workstation as default

how can i find currently installed package, and pin it so when I upgrade the channel and then do a nixos-rebuild switch doesnt download the new one which is still broken.