update: I removed it so this post is useless now
My apt repository still ain’t perfect yet but it’s kinda useable now.
The nvidia dist is just a mirror of https://developer.download.nvidia.com/compute/cuda/repos/debian12/
with the ability to be pinned so it should be fine.
- Register the PGP key
wget -qO - https://apt.snoeijs.tech/debian/snoeijs.tech.gpg.key | sudo gpg --dearmor -vo /usr/share/keyrings/snoeijs.tech.gpg
- Add repositories
for dist in nvidia snoeijs; do
echo "deb [signed-by=/usr/share/keyrings/snoeijs.tech.gpg] http://apt.snoeijs.tech/debian/ $dist main"
done | sudo tee /etc/apt/sources.list.d/snoeijs.list
- Add apt preferences
Example configuration of /etc/apt/preferences.d/snoeijs.pref
Package: *
Pin: release a=nvidia
Pin-Priority: 1000
Package: *
Pin: release a=snoeijs
Pin-Priority: 550
- Update apt
sudo apt update