diff options
| author | Jörg Thalheim <joerg@thalheim.io> | 2024-09-11 13:01:26 +0200 |
|---|---|---|
| committer | Antoine Cotten <hello@acotten.com> | 2024-09-11 13:01:26 +0200 |
| commit | 7e6c548eef2372cef1287ef45350e29ca5740159 (patch) | |
| tree | b7b9770b2fc985171d543bc9c4d652bb4f058a19 /modules/programs | |
| parent | f4f18f3d7229845e1c9d517457b7a0b90a38b728 (diff) | |
zsh: let children shells set their fpath
Currently zshenv by default only sets fpath without exporting it. A
parent shell would also not set those variables usually as they are
shell local.
It also sources a file called set-environment but this is protected by
an environment variable called __NIX_DARWIN_SET_ENVIRONMENT_DONE. Hence
any modification done by the parent shell should persist as long as
__NIX_DARWIN_SET_ENVIRONMENT_DONE is not unset.
This behavior deviates from what we do in bashrc and breaks common
setups such as tmux/mosh or screen.
NixOS/nixpkgs@55819e6c861f53450030eea832a76583a6786370
Diffstat (limited to 'modules/programs')
| -rw-r--r-- | modules/programs/zsh/default.nix | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/programs/zsh/default.nix b/modules/programs/zsh/default.nix index 58a3155..1f36740 100644 --- a/modules/programs/zsh/default.nix +++ b/modules/programs/zsh/default.nix @@ -124,9 +124,8 @@ in # This file is read for all shells. # Only execute this file once per shell. - # But don't clobber the environment of interactive non-login children! if [ -n "$__ETC_ZSHENV_SOURCED" ]; then return; fi - export __ETC_ZSHENV_SOURCED=1 + __ETC_ZSHENV_SOURCED=1 # Don't execute this file when running in a pure nix-shell. if test -n "$IN_NIX_SHELL"; then return; fi |
