From 7e6c548eef2372cef1287ef45350e29ca5740159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 11 Sep 2024 13:01:26 +0200 Subject: 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 --- modules/programs/zsh/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/programs') 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 -- cgit v1.2.3