-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc.base
75 lines (64 loc) · 2.3 KB
/
.zshrc.base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
### My "base" config with a common setup appropriate for both home & work.
### This is to be sourced by ~/.zshrc, typically near the top.
### PATH
export PATH="/opt/homebrew/Cellar/git/2.37.0/bin"
export PATH="$PATH:/Users/ahebert/work/infrastructure/bin"
export PATH="$PATH:/opt/homebrew/opt/[email protected]/libexec/bin"
## Sensitive ENVs (keys, passwords, &c.), source all *.env from ~/.secrets
###
### Load this early to avoid overwriting values defined in the main .zshrc
for file in ~/.secrets/*.env; do
if [[ -f "$file" ]]; then
source "$file"
fi
done
### Exports
export COMPOSE_DOCKER_CLI_BUILD=0
export DOCKER_DEFAULT_PLATFORM=linux/amd64
export DOCKER_BUILDKIT=0
export EDITOR="nvim"
export NVM_DIR="$HOME/.nvm"
### Telemetry
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_BAT=1
export APOLLO_TELEMETRY_DISABLED=true
### Fix macOS, because it gets worse every release
export HOMEBREW_CASK_OPTS="--no-quarantine"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"
### ZSH
ZSH=$HOME/.oh-my-zsh
source $ZSH/oh-my-zsh.sh
eval "$(rbenv init - zsh)"
### Theme support
ZSH_THEME=""
autoload -U promptinit; promptinit
prompt pure
### Basic Functions & Helpers
# Start GPG agent for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
eval $(gpg-agent --daemon &>/dev/null)
fi
### Ensures we run the bundler version as defined in Gemfile.lock
function bundle_v() {
BUNDLEVERSION=$(tail -n -1 Gemfile.lock | tr -d '[:space:]')
echo "---Running bundler with version ${BUNDLEVERSION} from Gemfile.lock---"
bundler _"${BUNDLEVERSION}"_ "$@"
echo "---Ran bundler with version ${BUNDLEVERSION}---"
}
### Basic Aliases
alias l="eza -abl --group-directories-first"
alias be="bundle_v exec"
alias dc="docker compose"
alias ds='docker stats $(docker ps --format={{.Names}})'
alias fuck='sudo dscacheutil -flushcache; sudo killall -9 mDNSResponder; sudo killall -9 mDNSResponderHelper'
alias iclean="docker container prune && docker image prune"
alias idangle='docker rmi $(docker images -f "dangling=true" -q)'
alias lzd='lazydocker'
alias kc="kubectl"
alias startssh='eval `ssh-agent -s`'
alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
alias vim="nvim"