How to properly add a channel to nixpkgs

Question:

added unstable channel to my nix via:
nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable
nix-channel --update

When I try to install something from unstable I get this:
nix-env -iA unstable.cuda_nvcc
warning: name collision in input Nix expressions, skipping '/home/brian/.nix-defexpr/channels_root/unstable' error: attribute 'cuda_nvcc' in selection path 'unstable.cuda_nvcc' not found

I’m expecting unstable.cuda_nvcc to install and for me to be able to use it in a shell.nix

Most likely I’m doing something wrong here or missing a step. Can someone help?

cuda_nvcc is under cudaPackages set. You should try installing it like nix-env -f '<unstable>' -iA cudaPackages.cuda_nvcc.