You could try using the less error prone nvidia-dkms instead of nvidia. Then you’ll need kernel headers too.
nvidia-dkms
nvidia