revamp of nix organization
This commit is contained in:
parent
01a48ac956
commit
4a4014bf59
20 changed files with 369 additions and 129 deletions
32
nix/home/programs/zsh/zshrc
Normal file
32
nix/home/programs/zsh/zshrc
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
export LOCALE_ARCHIVE="/usr/lib/locale/locale-archive"
|
||||
export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels:$NIX_PATH
|
||||
export EDITOR=vim
|
||||
|
||||
source $HOME/.nix-profile/etc/profile.d/nix.sh
|
||||
source $HOME/.nix-profile/share/fzf/key-bindings.zsh
|
||||
source $HOME/.nix-profile/share/fzf/completion.zsh
|
||||
source $HOME/.nix-profile/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
source $HOME/.nix-profile/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source $HOME/.config/zsh/local.zsh
|
||||
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
bindkey -M viins 'jj' vi-cmd-mode
|
||||
|
||||
# utility for storing functions under a new name
|
||||
save_function() {
|
||||
local ORIG_FUNC=$(declare -f $1)
|
||||
local NEWNAME_FUNC="$2''${ORIG_FUNC#$1}"
|
||||
eval "$NEWNAME_FUNC"
|
||||
}
|
||||
|
||||
# Override an oh-my-zsh/lib/git.sh function so that old repositories
|
||||
# don't slow the shell down
|
||||
save_function git_prompt_status old_git_prompt_status
|
||||
function git_prompt_status() {
|
||||
if [[ "$(command git config --get oh-my-zsh.hide-prompt-status 2>/dev/null)" != "1" ]]; then
|
||||
old_git_prompt_status
|
||||
fi
|
||||
}
|
||||
|
||||
eval "$(direnv hook zsh)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue