powerlevel10k icon indicating copy to clipboard operation
powerlevel10k copied to clipboard

Feature request: support "nix shell" (flakes) for nix_shell segment

Open evilmav opened this issue 3 years ago • 2 comments

Nix now supports new command style, using nix shell and nix develop commands with flake.nix in addition to nix-shell. See Flakes. The nix_shell segment does not seem to be currently activated under nix shell. This would be really helpful.

evilmav avatar Jun 09 '22 15:06 evilmav

Do you have IN_NIX_SHELL environment variable in there? If so, what's the value? If not, how can one detect whether shell is running under nix shell?

romkatv avatar Jun 09 '22 15:06 romkatv

I've just realized it was done by using this variable and started looking for it. Unfortunately, it seems to be missing currently. There is some discussion on workarounds there, but checking for /nix/store in the path would probably be too ugly... The PR for IN_NIX3_SHELL seems stale too. Unless you have a better idea, this is probably blocked and I'll just see if I can explicitly set IN_NIX_SHELL in my flake.nix as a workaround for now..

evilmav avatar Jun 09 '22 15:06 evilmav