I worked on removing the horrible code duplication by generating the NVIDIA configs at build time. It's still not ideal, but a lot better than before. Also added driver 450 to mhwd, although those still need to be added in the repos.
Of course there could be mistakes I missed or bad code, so please review carefully. Details about the changes can be found in the pull requests and/or commit comments.
Paging @philm, here's your promised refactor and NVIDIA 450 support