Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zsh: move setEnvironment stuff to zprofile #40223

Conversation

jD91mZM2
Copy link
Member

@jD91mZM2 jD91mZM2 commented May 9, 2018

.zshenv is always sourced, meaning it'll override all local environment variables with their system defaults.
It'll also make your shell startup 0.0000000000001ms slower.
.zprofile is only sourced for login shells, meaning users who set environment stuff in the .xprofile will get to keep their modifications.

The current xsession script will already source /etc/profile so all envs will still be avaiable from X.

We should probably use /etc/environment instead of a per-shell global default though IMO

Unverified

The committer email address is not verified.
@lheckemann
Copy link
Member

Should fix #33219

@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels May 9, 2018
@matthewbauer matthewbauer merged commit 485fe9e into NixOS:master May 16, 2018
@jD91mZM2 jD91mZM2 deleted the shouldnt-we-just-use-the-pam-environment-file-instead branch May 16, 2018 06:02
@gkleen
Copy link
Contributor

gkleen commented May 19, 2018

This seems to break non-interactive-, non-login-shells (e.g. ssh): #40759

@jD91mZM2
Copy link
Member Author

we should really just use /etc/environment

@xeji
Copy link
Contributor

xeji commented May 19, 2018

Reverted in effb021 (#40759).

xeji added a commit that referenced this pull request May 19, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Revert "zsh: move setEnvironment stuff to zprofile" (#40223)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants