I’m trying to install Nix on Google colab because of a Python package that has dependencies outside of pip.
The installation seems to work but commands such as nix-shell or nix-daemon do not work. It seems like there is something about starting a new terminal before using Nix but I do not know how to do that with google colab.
You might just need to source the shell hook. What shell does collab use? If it’s bash, you might just be able to source /etc/bashrc (or whichever rc file nix installed itself to).
(The installer tells you to restart the shell because that’s easier than explaining how to know what to source again, how to deal with rc files that are guarded against double execution, etc.)
I think it uses bash. I am not sure what sourcing a shell hook means but I asked chatgpt about your comment and it told me that you are suggesting that I use the command
Sorry, I was typing on a phone keyboard where formatting is ~hard. Assuming /etc/bashrc exists and you see references to Nix in it, you can run source /etc/bashrc or . /etc/bashrc (they are equivalent).