You can use nix develop --profile ./profile
. This makes it save the devshell as a version of a profile, which prevents it from being garbage-collected. You can enter any version of the profile by doing nix develop ./profile-<version>-link
.
4 Likes