After installing Kali on hard disk, i stumbled upon a problem when installing nvidia driver

when I try command

apt-get install -y linux-headers-$(uname -r)

it shows package not found

E: Unable to locate package linux-headers-4.0.0-kali1-amd64

this problem persist because I have opt out to install from network mirror. So you need to update your /etc/apt/sources.list

i found solution when reading this post install tips

If for some reason you chose “no” when asked “use a network mirror” during your Kali installation, you may be missing some entries in your sources.list file. If this is the case, check the official repository list for the entries that should be in that file. Despite what many unofficial guides instruct you to do, avoid adding extra repositories to your sources.list file. Don’t add kali-dev, kali-rolling, or any other Kali repositories unless you have a specific reason to – which usually, you won’t. If you *must* add additional repositories, drop a new sources file in /etc/apt/sources.list.d/ instead.
make sure the lines is in your sources.lisr

deb-src sana main non-free contrib
deb-src sana/updates main contrib non-free

deb sana main non-free contrib
deb sana/updates main contrib non-free 

then update your repository

apt-get update
apt-get dist-upgrade

now you can install back anything you need.