-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
路152 lines (117 loc) 路 3.82 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
路152 lines (117 loc) 路 3.82 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#!/usr/bin/env bash
MODE=$1
if [[ $MODE != "setup" ]]; then
MODE="update"
fi
echo "mode: $MODE"
# gitconfig + claude symlink
if [[ $MODE == "setup" ]]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
curl -fsSL https://bun.com/install | bash
cp ~/.config/.gitconfig ~/.gitconfig
# symlink ~/.claude -> ~/.config/.claude so skills/settings are tracked in git
rm -rf ~/.claude
ln -sf ~/.config/.claude ~/.claude
fi
# ssh-agent: load keychain keys for non-fish shells too (bash/zsh subprocesses,
# e.g. Claude Code tool calls, don't source config.fish)
[[ -f ~/.zshenv ]] || cat > ~/.zshenv <<'EOF'
# Load all saved ssh keys
/usr/bin/ssh-add --apple-load-keychain >/dev/null 2>&1
EOF
[[ -f ~/.bashrc ]] || cat > ~/.bashrc <<'EOF'
# Load all saved ssh keys
/usr/bin/ssh-add --apple-load-keychain >/dev/null 2>&1
EOF
[[ -f ~/.bash_profile ]] || cat > ~/.bash_profile <<'EOF'
[ -f ~/.bashrc ] && source ~/.bashrc
EOF
[[ -f ~/.ssh/config ]] || (mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat > ~/.ssh/config <<'EOF'
Host *
AddKeysToAgent yes
UseKeychain yes
Host github.com
IdentityFile ~/.ssh/id_ed25519
EOF
chmod 600 ~/.ssh/config)
# setup
brew update && brew upgrade
brew install fish mise
# brew taps
brew tap hashicorp/tap
brew tap FelixKratz/formulae
brew tap nikitabobko/tap
brew tap guumaster/tap
# install life basically
brew install coreutils hostctl \
ghostty starship tmux \
btop jq yq wget fswatch bat ripgrep fd fzf \
kind derailed/k9s/k9s kubectl kubectx jesseduffield/lazydocker/lazydocker ko \
gh lazygit git-delta \
openvpn-connect hashicorp/tap/terraform hashicorp/tap/vault \
stats borders fastfetch nikitabobko/tap/aerospace font-hack-nerd-font \
luarocks obsidian anomalyco/tap/opencode \
mac-cleanup-py cargo-binstall glow ghui mole shellcheck
brew install --cask font-lilex-nerd-font
# fish as default shell
if [[ $MODE == "setup" ]]; then
which fish | sudo tee -a /etc/shells
chsh -s "$(which fish)" || true
fish || true
fish_add_path "$(which brew)"
# fish plugin manager
# shellcheck disable=SC1090
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
fisher install jorgebucaran/nvm.fish # node version manager
fisher install edc/bass # bash with fish
fi
fisher update
fish_update_completions
# languages
mise use -g zig
mise use -g java
mise use -g go
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
go install mvdan.cc/sh/v3/cmd/shfmt@latest
mise use -g rust
brew install lua
cargo install stylua
cargo binstall tree-sitter-cli
nvm install latest
npm install -g yarn
# ccstatusline: install under mise's global node so the binary path is stable;
# settings.json points statusLine.command at this absolute path so it works
# regardless of which node version a project pins
mise use -g node
mise exec node@latest -- npm install -g ccstatusline
mise use -g python
pip install --upgrade pip
pip install --user pipx
mise plugins install poetry --force
poetry completions fish > ~/.config/fish/completions/poetry.fish
# rpi
sudo hostctl add domains rpi \
dashboard.shrtcts.fr \
wgeasy.shrtcts.fr \
proxy.shrtcts.fr \
qbittorrent.shrtcts.fr \
jellyfin.shrtcts.fr \
kuma.shrtcts.fr \
openbao.shrtcts.fr \
observability.shrtcts.fr \
renovaite.shrtcts.fr \
renovaite-api.shrtcts.fr --ip 192.168.1.19
# lang
luarocks install luacheck
luarocks install argparse
cargo install bob-nvim
bob use latest
# setup fzf
if [[ $MODE == "setup" ]]; then
# shellcheck disable=SC1090
fzf --fish | source
fi
# last cleanup
brew update && brew upgrade && brew doctor && brew cleanup
# mission control https://nikitabobko.github.io/AeroSpace/guide#a-note-on-mission-control
defaults write com.apple.dock expose-group-apps -bool true && killall Dock