Flake-based dev shells with nix-direnv: library problems

I’m in the process of moving my generic dev shells to a public repo with the purpose to make it trivial to enter a certain (impure) dev env.

However, I’m struggling to get it working.

Taking as an example the following .envrc:

use flake github:ppenguin/nixenvs#dev-ansible --impure

yields

> cd test-direnv
direnv: loading ~/devel/github.com/ppenguin/nixenvs/test-direnv/.envrc
direnv: using flake github:ppenguin/nixenvs#dev-ansible --impure
direnv: nix-direnv: using cached dev shell
/nix/store/p643r4aczmzb0dhyrx3dj592f0s5v7xj-coreutils-9.0/bin/dircolors: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument
/nix/store/29zfzn3jzx04xqlpp3wzf7gzvvmdcw62-gnupg-2.3.6/bin/gpg-connect-agent: error while loading shared libraries: __vdso_gettimeofday: invalid mode for dlopen(): Invalid argument
*** stack smashing detected ***: terminated

I understand that this must be caused by incompatibilities in my inherited shell (zsh) env and the instantiated nix dev env. (I.e. features from e.g. oh-my-zsh referring to basic libs (glibc?) in my “home env” which are apparently overridden by the dev env.

However, I was expecting that being impure should take care of this?
Impurity is a requirement anyway, because the objective is to use these shells in my existing HM-based config (or other user’s non-nixos-based env) which has vscode with plugins installed to be used in conjunction, and via direnv.

So what I want to achieve is dev (and run) envs in a remote public repo that are “superimposed” on the normal user-environment, and that I can execute via .envrc.

Here’s my current experimental status, which is unsatisfactory because it doesn’t work with direnv and if used via nix develop <flake-attribute> it drops me in a bash and not in an “augmented” user shell (zsh in my case).

If I call the shell directly from .envrc, e.g. like here it works as intended.

Hosted by Flying Circus.