Configure nix-shell to use a shell other than Bash?

I am on NixOS 15 and nix-shell v1.10. I use Zsh as the main shell now and would like to use it in combination with Oh-My-Zsh in the nix shell, and also when I work in development environments built using the Nix expression.

If this helps, here is one of the Nix environments I set up for the Rails project:

with import <nixpkgs> {}; { cannyFreeRadicalEnv = stdenv.mkDerivation rec { name = "canny-free-radical-env"; version = "0.1"; src = ./.; buildInputs = [ stdenv ruby_2_2_2 bundler_HEAD zlib postgresql94 sqlite ]; }; } 

** Edit **

Running the command this way does not indicate in the CLI hint that I am in the nix shell. Is there an easy way to detect this so that I can script quickly in my zshrc ?

+5
source share
2 answers

recently opened PR # 545 , which will be considered this

+4
source

Thanks to the guys from the IRC channel #nixos for the quick response.

The command for this:

nix-shell . --command "zsh"

+3
source

Source: https://habr.com/ru/post/1233307/


All Articles