mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 09:43:30 +01:00
This patch fixes two issues: 1. The file in which environment variables are set is inconsistent. - This file sets them in zprofile when programs.zsh.enable is not set. - Zsh module sets them in zshenv when programs.zsh.enable is set. 2. Setting environment variables in zprofile overrides what users set in .zshenv. See these[1] home-manager[2] issues[3]. /etc/profile is also changed to /etc/set-environment. Here is a comparison: Using /etc/profile: - Pros - config.environment.shellInit is sourced in all zsh - Cons - config.environment.loginShellInit is also sourced in non-login zsh - config.programs.bash.shellInit is also sourced in all zsh - config.programs.bash.loginShellInit is also sourced in all zsh Using /etc/set-environment: - Pros - config.programs.bash.shellInit is not sourced in any zsh - config.programs.bash.loginShellInit is not sourced in any zsh - Cons - config.environment.shellInit is not sourced in any zsh - config.environment.loginShellInit is not sourced in any zsh [1]: https://github.com/nix-community/home-manager/issues/2751#issuecomment-1048682643 [2]: https://github.com/nix-community/home-manager/issues/2991 [3]: https://github.com/nix-community/home-manager/issues/3681#issuecomment-1436054233 |
||
|---|---|---|
| .. | ||
| release-notes.md | ||
| rl-1310.section.md | ||
| rl-1404.section.md | ||
| rl-1412.section.md | ||
| rl-1509.section.md | ||
| rl-1603.section.md | ||
| rl-1609.section.md | ||
| rl-1703.section.md | ||
| rl-1709.section.md | ||
| rl-1803.section.md | ||
| rl-1809.section.md | ||
| rl-1903.section.md | ||
| rl-1909.section.md | ||
| rl-2003.section.md | ||
| rl-2009.section.md | ||
| rl-2105.section.md | ||
| rl-2111.section.md | ||
| rl-2205.section.md | ||
| rl-2211.section.md | ||
| rl-2305.section.md | ||