| 3 Jul 2021 |
siraben | huh how did you get ~/.nix-profile to appear first | 07:27:01 |
treed | Just what I pasted above. | 07:27:32 |
treed | It ends up in .zshrc | 07:27:36 |
treed | It is almost the last thing in .zshrc | 07:29:54 |
treed | The only thing after it is the direnv hook | 07:29:59 |
siraben | treed: did you adjust anything in /etc/? | 07:31:43 |
treed | I don't think so? | 07:31:49 |
siraben | In reply to @siraben:matrix.org treed: my path now looks like /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/siraben/.nix-profile/bin:/nix/var/nix/profiles/default/bin re-logged, still same path | 07:32:15 |
treed | Weird | 07:32:22 |
siraben | typeset -U path cdpath fpath manpath
for profile in ${(z)NIX_PROFILES}; do
fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions)
done
HELPDIR="/nix/store/zvg2cmpc06hsrr6cx53c53waq1z7kfxq-zsh-5.8/share/zsh/$ZSH_VERSION/help"
# Oh-My-Zsh/Prezto calls compinit during initialization,
# calling it twice causes slight start up slowdown
# as all $fpath entries will be traversed again.
# Environment variables
. "/Users/siraben/.nix-profile/etc/profile.d/hm-session-vars.sh"
# oh-my-zsh extra settings for plugins
# oh-my-zsh configuration generated by NixOS
plugins=(git autojump)
ZSH_THEME="robbyrussell"
source $ZSH/oh-my-zsh.sh
# History options should be set in .zshrc and after oh-my-zsh sourcing.
# See https://github.com/nix-community/home-manager/issues/177.
HISTSIZE="100000"
SAVEHIST="100000"
HISTFILE="$HOME/.zsh_history"
mkdir -p "$(dirname "$HISTFILE")"
setopt HIST_FCNTL_LOCK
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_SPACE
unsetopt HIST_EXPIRE_DUPS_FIRST
setopt SHARE_HISTORY
unsetopt EXTENDED_HISTORY
eval "$(/nix/store/1f4hrxvl66ylnlgrq8px8lfjx8iizik1-direnv-2.28.0/bin/direnv hook zsh)"
# For multi-user installation
export NIX_PATH=$NIX_PATH:$HOME/.nix-defexpr/channels
source $HOME/.nix/remote-build-env
# source /nix/store/m6f285lbh6g0kzfmi0zrx6j6mcs79b9q-nix-index-0.1.2/etc/profile.d/command-not-found.sh
# This should be in envExtra, but Mac sets PATH from zprofile, which comes after zshenv
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh; fi
| 07:33:11 |
siraben | relevant parts of ~/.zshrc | 07:33:20 |
treed | Looks like my /etc files aren't modified as far as I can tell | 07:33:22 |
treed | no nix-darwin on this machine either | 07:33:26 |
siraben | what's the order of config files that are loaded on macos? | 07:33:44 |
siraben | I wonder if oh-my-zsh has anything to do with this | 07:34:02 |
treed | zshenv, zprofile, zshrc zlogin | 07:34:26 |
treed | global first then user | 07:34:28 |
treed | that is, global zsh env then user zshenv, then global zprofile, etc | 07:34:40 |
treed | I forget when it will do profile | 07:35:14 |
treed | I think only if zprofile doesn't exist or something? | 07:35:20 |
siraben | hm, this line in nix-daemon.sh export PATH="$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:$PATH" | 07:35:53 |
treed | https://zsh.sourceforge.io/Doc/Release/Files.html#Files | 07:36:24 |
treed | I don't see any mention of .profile there at all so maybe it just doesn't | 07:36:35 |
siraben | lol my /etc/zprofile | 07:37:14 |
siraben | # System-wide profile for interactive zsh(1) login shells.
# Setup user specific overrides for this in ~/.zprofile. See zshbuiltins(1)
# and zshoptions(1) for more details.
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
| 07:37:16 |
siraben | that command evals | 07:37:32 |
siraben | PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/siraben/.nix-profile/bin:/nix/var/nix/profiles/default/bin"; export PATH;
| 07:37:33 |
siraben | So I found the culprit | 07:37:34 |
siraben | though I'm not sure if I'm supposed to remove this | 07:37:36 |
treed | Yeah, that's what my thing was for | 07:38:04 |