Installing libraries globally is not the intended usecase for NixOS. Of course there are ways to make using dev shells easier, e.g. nix-direnv can automatically enter the dev shell when you’re in the project dir.
You could do something insane and put them enviroment.variables, you could do something marginally less insane and add them to sessionVariables under home-manager,. but really you actually want a shell.nix or whatever the flake equivalent is so that you aren’t carrying this around everywhere, but instead access it when you are presumably developing with cuda / curses.