# Anyone using Nix packages

Did a bit of hacking…
You need to bootstrap your login shell so that you can run your own bashrc (Explained in another post)
In this bashrc add the following:
##########################
# Reseat HOME to the location of this .bashrc
#
# 1. Get the real path of the current .bashrc

REAL_BASHRC="$(…"

# Auto-terminate instance from shell

Use a shell trap.
help trap / google / ai chatbot for more info
Try something like this…
# Your stuff ... snip ...

function post_training_cleanup()
{
# You'll need to read the docs / tinker here..
# But I imagine a shutdown or poweroff would be sufficient
# Might require privilege escalati…

# Rc files in $HOME or somewhere else?

Answering my own question with the help of Claude…
Prior to logging into your instance for the first time, create a symlink that points “${HOME}/.bash_profile” to your desired bashrc
Scripted like this… Export LAMBDALABS_INSTANCE and LAMBDALABS_MOUNT on your pc to suit.
# 1. Create a .bash_profi…
