nix-user-chroot
nix-user-chroot copied to clipboard
Detaching from session causes breakage
Hello!
I am having trouble with my sessions that have been detached and reattached to. Specifically, if I do the something like the following:
$ nix-user-chroot ~/.nix /bin/bash -lc "~/.nix-profile/bin/tmux"
Inside this chroot environment, everything works fine. However, if I then detach from the session using "CTRL+B D", and execute the command to attach to my previous session:
$ nix-user-chroot ~/.nix /bin/bash -lc "~/.nix-profile/bin/tmux attach"
I'll get something like:
$ ls
-bash: /usr/bin/ls: No such file or directory
If I try to cd around, the only directory that exists is /
. Can't access /nix
, or /home
, or anything else. Only thing I can use is shell built-ins, or quit the session with CTRL+D. My $PATH isn't any different, nor anything else that stands out to me. If I were to create a fresh tmux session again, everything would work fine. Detaching and reattaching causes the issues. I will also note that this is independent of session management application. I tried both tmux
and abduco
, both with the same result.
Is there anything I can do to make this functionality work? Happy to provide any additional information or perform tests as needed.
Thank you!
Same issue.