Move zshrc to external file

This commit is contained in:
Leonora Tindall 2024-08-31 18:32:06 -05:00
parent 529a55c96c
commit bb7277d345
2 changed files with 29 additions and 25 deletions

28
rcfiles/zshrc Normal file
View File

@ -0,0 +1,28 @@
# load Cargo
if [ -f "$HOME/.cargo/env" ]; then
. "$HOME/.cargo/env"
fi
# load Guix
export GUIX_PROFILE="/home/nora/.config/guix/current"
if [ -f "$GUIX_PROFILE/etc/profile" ]; then
. "$GUIX_PROFILE/etc/profile"
fi
# load Guix stuff, if it exists
if [[ -d "$HOME/.zsh/functions" ]]; then
export fpath=(~/.zsh/functions $fpath)
autoload -U compinit && compinit
fi
export NOTESDIR="$HOME/Notes"
export PATH="$HOME/.bin:$HOME/.local/bin:$NOTESDIR/bin:$PATH"
function set_win_title(){
echo -ne "\033]0;\007"
}
precmd_functions+=(set_win_title)
fortune

26
zsh.nix
View File

@ -9,30 +9,6 @@
autosuggestion.enable = false;
enableCompletion = true;
enableVteIntegration = true;
initExtra = ''
# load Cargo
if [ -f "$HOME/.cargo/env ]; then
. "$HOME/.cargo/env"
fi
# load Guix
export GUIX_PROFILE="/home/nora/.config/guix/current"
if [[ -f "$GUIX_PROFILE/etc/profile" ]]; then
. "$GUIX_PROFILE/etc/profile"
fi
if [[ -d "$HOME/.zsh/functions" ]]; then
export fpath=(~/.zsh/functions $fpath)
autoload -U compinit && compinit
fi
export NOTESDIR="$HOME/Notes"
export PATH="$HOME/.bin:$HOME/.local/bin:$NOTESDIR/bin:$PATH"
function set_win_title(){
echo -ne "\033]0;\007"
}
precmd_functions+=(set_win_title)
fortune
'';
initExtra = (builtins.readFile ./rcfiles/zshrc);
};
}