From 51fbae7d712dff1f5038df0b728b4a023e22fd1e Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Fri, 11 Feb 2022 11:35:34 +0100 Subject: [PATCH] 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. --- home.nix | 1 + home/files/profile | 8 ++++++++ home/programs/zsh.nix | 16 ---------------- 3 files changed, 9 insertions(+), 16 deletions(-) create mode 100644 home/files/profile diff --git a/home.nix b/home.nix index 788db11..5913d28 100644 --- a/home.nix +++ b/home.nix @@ -104,6 +104,7 @@ }; home.file = { + ".profile".source = ./home/files/profile; ".myclirc".source = ./home/files/myclirc; ".agignore".source = ./home/files/agignore; }; diff --git a/home/files/profile b/home/files/profile new file mode 100644 index 0000000..36f41ad --- /dev/null +++ b/home/files/profile @@ -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 diff --git a/home/programs/zsh.nix b/home/programs/zsh.nix index f147d87..ce591ee 100644 --- a/home/programs/zsh.nix +++ b/home/programs/zsh.nix @@ -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