Move user / system specifics to .profile file instead of .zshrc

This ensures it is properly set on login.
Tools like dmenu and such are properly find when installed by nix.
This was not zsh specific anyway.
This commit is contained in:
Daniel Siepmann 2022-02-11 11:35:34 +01:00
parent a62943d0bb
commit 51fbae7d71
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
3 changed files with 9 additions and 16 deletions

View file

@ -104,6 +104,7 @@
};
home.file = {
".profile".source = ./home/files/profile;
".myclirc".source = ./home/files/myclirc;
".agignore".source = ./home/files/agignore;
};

8
home/files/profile Normal file
View file

@ -0,0 +1,8 @@
if [[ -z $SSH_AGENT_PID ]]; then
hash ssh-agent 2> /dev/null && eval $(ssh-agent) > /dev/null
fi
# "install" nix
if [ -e /home/daniels/.nix-profile/etc/profile.d/nix.sh ]; then . /home/daniels/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
export LOCALE_ARCHIVE="$(readlink ~/.nix-profile/lib/locale)/locale-archive"
export NIX_PATH=$HOME/.nix-defexpr/channels

View file

@ -60,22 +60,6 @@
share = false;
};
initExtraBeforeCompInit = ''
if [[ -z $SSH_AGENT_PID ]]; then
hash ssh-agent 2> /dev/null && eval $(ssh-agent) > /dev/null
fi
# Global composer installed packages.
export PATH=~/.composer/vendor/bin:$PATH
# Own "binaries" / executables, local to this machine
export PATH=~/bin:$PATH
# "install" nix
if [ -e /home/daniels/.nix-profile/etc/profile.d/nix.sh ]; then . /home/daniels/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
export LOCALE_ARCHIVE="$(readlink ~/.nix-profile/lib/locale)/locale-archive"
export NIX_PATH=$HOME/.nix-defexpr/channels
'';
initExtra = ''
autoload -U colors && colors
autoload -U promptinit