The tricky bit was that we had to use a different storeDir because the normal store is not a real store in the sandbox. Also HOME apprently wasn't picked up, and XDG_CONFIG_HOME was broken; see previous commit.
The .gitignore in foo causes foo itself to be ignored