ZSH as login shell in NixOs

ZSH as login shell in NixOs

Publié le 20 décembre 2015 par Lancelot SIX.
cc-by

Zsh, especially improved with OhMyZSH, is a great shell to work with. In NixOs, the default shell is bash, and everything is confired to work with it.

In particular, using zsh, one can unconter some difficulties such as the following:

This is because the environment is not completely set when the shell tried to launch a command just after the ssh connection is opened:

Fortunately, nixos provide a conviniant and declarative way to properly configure zsh. To do so, one have to update his /etc/nix/configuration.nix file and make sure it contains something similar to the following: