mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-20 12:08:17 +03:00
8e2e741ab5
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 |
||
---|---|---|
.. | ||
doc/manual | ||
lib | ||
maintainers | ||
modules | ||
tests | ||
COPYING | ||
default.nix | ||
README | ||
release-combined.nix | ||
release-small.nix | ||
release.nix |
*** NixOS *** NixOS is a Linux distribution based on the purely functional package management system Nix. More information can be found at https://nixos.org/nixos and in the manual in doc/manual.