nixpkgs/nixos/modules/programs/zsh
Tor Hedin Brønner d273db48c6 nixos/shells: avoid overriding the environment for child shells
A shared exported guard `__NIXOS_SET_ENVIRONMENT_DONE` is introduced that can
be used to prevent child shells from sourcing `system.build.setEnvironment`
the second time.

This fixes e.g. `nix run derivation` when run from e.g. ZSH through the console or
ssh. Before this Bash would resource the common environment resetting the `PATH`
environment variable.

We also export `system.build.setEnvironment` to `/etc/set-environment` making it
easy to reset the common environment with `. /etc/set-environment` when
needed and to grep for environment variables in `/etc` (which was the
motivation of #30418).

This reverts changes made in b00a3fc6fd
(the original #30418).
2018-08-30 13:20:39 +00:00
..
oh-my-zsh.nix nixos/oh-my-zsh: add documentation 2018-08-07 15:47:02 +02:00
oh-my-zsh.xml nixos/oh-my-zsh: add documentation 2018-08-07 15:47:02 +02:00
zinputrc
zsh-autoenv.nix zsh-autoenv: init at 2017-12-16 (#34932) 2018-02-14 06:31:59 +00:00
zsh-autosuggestions.nix nixos/autosuggestions: add module (#41397) 2018-06-10 23:08:50 +02:00
zsh-syntax-highlighting.nix nixos/zsh-syntax-highlighting: refactor 2017-10-09 23:30:10 +02:00
zsh.nix nixos/shells: avoid overriding the environment for child shells 2018-08-30 13:20:39 +00:00