Debian 12 and nvidia driver

I also use the Nvidia-provided .run installer and was able to successfully patch and compile the nvidia kernel module as described here on Debian 12 with the 6.1.0-18-amd64 kernel. It’s a patch provided by Gentoo and you may need to futz around with the file paths a bit, but it applies with fuzz and seems to be working fine. Hope this helps!