# Nix-shell does not use my user's shell (zsh)

**URL:** https://discourse.nixos.org/t/nix-shell-does-not-use-my-users-shell-zsh/5588
**Category:** Help
**Created:** [January 22, 2020, 12:31am UTC](https://discourse.nixos.org/t/nix-shell-does-not-use-my-users-shell-zsh/5588 "2020-01-22T00:31:49Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![mboyea](https://discourse.nixos.org/user_avatar/discourse.nixos.org/mboyea/32/28639_2.png) [@mboyea](https://discourse.nixos.org/u/mboyea)
#### Post date: [December 14, 2024, 8:49am UTC](https://discourse.nixos.org/t/nix-shell-does-not-use-my-users-shell-zsh/5588/13 "2024-12-14T08:49:13Z")

</div>

Hello!  
I also had this problem. I found that `nix-shell --run $SHELL` and `nix develop -c $SHELL` would both open ZSH as I preferred, so my solution was to make a bash alias for these two functions.

Add the following to your shell rc file:

```bash
alias nix-shell='nix-shell --run $SHELL'
nix() {
  if [[$1 == "develop"]]; then
    shift
    command nix develop -c $SHELL "$@"
  else
    command nix "$@"
  fi
}

```

For zsh, I added this to my `zshrc` file.

Now when I type `nix-shell` or `nix develop`, it opens zsh instead of bash.  
Hope this helps!

---

_[View the full topic](https://discourse.nixos.org/t/nix-shell-does-not-use-my-users-shell-zsh/5588)._
