diff --git a/rcfiles/zshrc b/rcfiles/zshrc new file mode 100644 index 0000000..a1e0aee --- /dev/null +++ b/rcfiles/zshrc @@ -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 + diff --git a/zsh.nix b/zsh.nix index db20543..11db96a 100644 --- a/zsh.nix +++ b/zsh.nix @@ -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); }; }