Files
chezmoi/dot_zshrc.tmpl
2025-08-02 18:15:15 +02:00

123 lines
3.3 KiB
Cheetah

#zmodload zsh/zprof
HISTFILE="$HOME/.zsh_history"
HISTSIZE=1000000000
SAVEHIST=1000000000
setopt hist_ignore_all_dups
setopt hist_ignore_space
{{ if .homebrew }}
#. ~/.asdf/plugins/golang/set-env.zsh
{{ end }}
GOPATH=~/go
GOBIN="$GOPATH/bin"
PATH="$HOME/.asdf/shims/:$GOBIN:$PATH:$HOME/bin/:$HOME/.local/bin/:$HOME/.dotnet/tools:$HOME/.cargo/bin:$HOME/.yarn/bin:$HOME/Library/Application Support/Coursier/bin:${KREW_ROOT:-$HOME/.krew}/bin"
{{ if .homebrew }}
export PATH="/opt/homebrew/opt/libpq/bin:$HOME/.git-bins/:$PATH"
export PATH=/opt/homebrew/bin:$PATH
export PATH="/Users/kah/.rustup/toolchains/nightly-aarch64-apple-darwin/bin:$PATH"
export PATH="$GOBIN/:$PATH"
{{ end }}
export DAGGER_CLOUD_TOKEN={{.dagger_cloud_token | quote}}
export GITHUB_TOKEN={{ .github_token | quote }}
export GITHUB_USERNAME=kjuulh
export GITHUB_ACCESS_TOKEN="$GITHUB_TOKEN"
export CLANK_KUBERNETES_CONFIGS={{ .clank_kubernetes_configs_path }}
{{ if not .homebrew -}}
alias hx="helix"
export EDITOR=helix
{{ else }}
HELIX_RUNTIME=/Users/kah/git/github.com/kjuulh/helix/runtime
export EDITOR=hx
{{ end -}}
fpath=("$HOME/.zsh_completions/" $fpath)
{{ if .homebrew }}
fpath=("$(brew --prefix)/share/zsh/site-functions" $fpath)
{{ end }}
# Use degit for faster cloning
#zstyle ':zim:completion' dumpfile
#zstyle ':completion::complete:*' cache-path ${XDG_CACHE_HOME}/zsh/zcompcache
zstyle ':zim:zmodule' use 'degit'
# set home
export ZIM_HOME=~/.zim
# Fetch zim package manager
if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then
curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \
https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
fi
# Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated.
if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
source ${ZIM_HOME}/zimfw.zsh init -q
fi
# Initialize modules.
source ${ZIM_HOME}/init.zsh
source ~/bin/zimfwupdate.sh
eval "$(zoxide init zsh)"
eval "$(fuzzy-clone init zsh)"
eval "$(gitnow init zsh)"
eval "$(non shell zsh)"
# pnpm
export PNPM_HOME="{{ .pnpm_home }}"
export PATH="$PNPM_HOME:$PATH"
# pnpm end
#
alias ,="source ,cd"
alias ,g="source ,ccd"
alias ,n="noil edit"
#alias nvim=lvim
alias cat=bat
alias python=python3
alias pip=pip3
alias ll="eza -l -g --icons"
alias ls="eza --icons"
alias m="mise run"
export OPENAI_API_KEY={{ .openai_token | quote }}
eval "$(starship init zsh)"
eval "$(atuin init zsh)"
{{ if .homebrew }}
eval "$(/opt/homebrew/bin/mise activate zsh)"
if [[ -n $GHOSTTY_RESOURCES_DIR ]]; then
# "$GHOSTTY_RESOURCES_DIR"/shell-integration/zsh/ghostty-integration
fi
{{ else }}
eval "$(/home/kjuulh/.local/bin/mise activate zsh)"
{{ end }}
#zprof
export ANSIBLE_VAULT_PASSWORD_FILE="~/.config/ansible/password"
export DRONE_SERVER=https://ci.i.kjuulh.io
export DRONE_HOST=https://ci.i.kjuulh.io
export DRONE_USER=kjuulh
export DRONE_TOKEN={{ .drone_token | quote }}
export GITEA_ACCESS_TOKEN={{ .gitea_token | quote }}
export GITEA_TOKEN={{ .gitea_token | quote }}
export GITEA_URL="https://git.i.kjuulh.io/api/v1"
export GITEA_ORG="kjuulh"
export GITHUB_COMMITTER_EMAIL=contact@kjuulh
export GITHUB_COMMITTER_NAME=kjuulh
export SHUTTLE_EXTENSIONS_REGISTRY="git=git@github.com:kjuulh/shuttle-extensions.git"
export SHUTTLE_EXTENSIONS_GITHUB_ACCESS_TOKEN="$GITHUB_TOKEN"
export CUDDLE_PLEASE_TOKEN=$GITEA_ACCESS_TOKEN
#zprof