Nix-shell + tmux workflow---preserve environment variables from shellHook?


I’m trying to figure out the best way to use tmux with nix-shell --pure so I don’t have to use multiple terminals and download dependencies multiple times.

The reason for the multiple dependency downloads is a very specific node setup that I can’t seem to get right with node2nix because of some webpack + electron issues. This means each invocation of nix-shell runs npm install and then the shellHook sets some environment variables that I need tmux to recognize.

Does anyone have any recommendations for how to get tmux to pick up the whole environment setup by nix-shell whenever I open a new pane? I don’t have a lot of tmux experience and after a good deal of searching I’m still a bit lost when it comes to making it play nicely with this nix-shell workflow.