diff --git a/zsh/distro/nixos.base.zsh b/zsh/distro/nixos.base.zsh new file mode 100644 index 0000000..66cdd2a --- /dev/null +++ b/zsh/distro/nixos.base.zsh @@ -0,0 +1,55 @@ +# Theming +autoload -Uz promptinit vcs_info +promptinit +zstyle ':vcs_info:*' enable git svn +setopt prompt_subst # Prompting +p10k_theme_file=/nix/store/wrkmpwgypqrdjq74cdpsy005qbm9b9db-powerlevel10k-1.18.0/share/zsh-powerlevel10k/powerlevel9k.zsh-theme +if [[ -f ${p10k_theme_file} ]]; then + source ${p10k_theme_file} +else + source ${DOTFILES}/zsh/themes/gentoo.zsh-theme +fi + +setopt correct # Auto correct mistakes +setopt extendedglob # allows regexp with * +setopt nocaseglob # Case insensitive globbing +setopt rcexpandparam # array expansion with parameters +setopt nocheckjobs # No warn about running processes on exiting +setopt nobeep +setopt appendhistory +setopt histignorealldups +setopt autocd +setopt inc_append_history +setopt histignorespace # Ignore putting in history commands beginning with a space + +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Zaz}' # Case insensitive completion +zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Color completion +zstyle ':completion:*' rehash true # automatically updates new paths +# Speed completion +zstyle ':completion:*' accept-exact '*(N)' +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path ~/.zsh/cache + +# History +HISTFILE=~/.zhistory +HISTSIZE=10000 +SAVEHIST=10000 +WORDCHARS=${WORDCHARS//\/[&.;]} + +# Color man pages +export LESS_TERMCAP_mb=$'\E[01;32m' +export LESS_TERMCAP_md=$'\E[01;32m' +export LESS_TERMCAP_me=$'\E[0m' +export LESS_TERMCAP_se=$'\E[0m' +export LESS_TERMCAP_so=$'\E[01;47;34m' +export LESS_TERMCAP_ue=$'\E[0m' +export LESS_TERMCAP_us=$'\E[01;36m' +export LESS=-R + +# Importing other packages +zsh_autosuggestions=/nix/store/h8k6qb5yxz327fhcvhzfv9d6w3lxw1kb-zsh-autosuggestions-0.7.0/share/zsh-autosuggestions/zsh-autosuggestions.zsh +[ -e ${zsh_autosuggestions} ] && source ${zsh_autosuggestions} + +zsh_highlight=/nix/store/p4yjkc8vy0c0swzcpcip5w9cmwyd30v9-zsh-syntax-highlighting-0.7.1/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + +[ -e ${zsh_highlight} ] && source ${zsh_highlight}