-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·109 lines (86 loc) · 3.37 KB
/
install
File metadata and controls
executable file
·109 lines (86 loc) · 3.37 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
#!/bin/zsh
export USERNAME=`whoami`
# GitHub Codespaces specific - add waiter to shell profiles early
if [ -n "${CODESPACES}" ]; then
# Copy waiter script to a location available before stow
# TODO: COPYING HERE BREAKS STOW LATER
# mkdir -p ~/.local/bin
# cp "$(dirname "$0")/bin/.local/bin/waiter" ~/.local/bin/waiter
# chmod +x ~/.local/bin/waiter
# Add waiter to .bashrc if it exists (default shell in codespaces)
if [ -f ~/.bashrc ]; then
# Only add if not already present and if dotfiles not complete
if ! grep -q "Auto-launch waiter for dotfiles setup" ~/.bashrc; then
echo '' >> ~/.bashrc
echo '# Auto-launch waiter for dotfiles setup (added by dotfiles install)' >> ~/.bashrc
echo 'if [ ! -f "$HOME/.dotfiles_complete" ] && [ -f "$HOME/.local/bin/waiter" ]; then' >> ~/.bashrc
echo ' exec $HOME/.local/bin/waiter' >> ~/.bashrc
echo 'fi' >> ~/.bashrc
fi
fi
fi
sudo chsh -s $(which zsh) $USERNAME
mkdir -p ~/bin
# DEBIAN specific
if [ -f "/etc/debian_version" ]; then
sudo apt update
sudo apt install -y \
stow \
tmux \
fzf \
ripgrep \
kitty-terminfo
# if brew isn't installed install it
if ! command -v brew &> /dev/null; then
echo "Homebrew not found, installing..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
brew install jj zellij neovim tree-sitter-cli
wget https://github.com/BlakeWilliams/remote-development-manager/releases/latest/download/rdm-linux-amd64
if [ ! -f "rdm-linux-amd64" ]; then wget https://github.com/BlakeWilliams/remote-development-manager/releases/download/v0.0.6/rdm-linux-amd64; fi
mv rdm-linux-amd64 ~/bin/rdm
chmod +x ~/bin/rdm
fi
# GitHub Codespaces specific
if [ -n "${CODESPACES}" ]; then
# Install bat
sudo apt install bat -y
mkdir -p ~/.local/bin
ln -s /usr/bin/batcat ~/.local/bin/bat
fi
## Install starship
curl -sS https://starship.rs/install.sh | sh -s -- --yes
## Install prezto
# if prezto folder does not exist then clone it
if [ ! -d ~/.zprezto ]; then
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
fi
rm -f ~/.gitconfig # remove any default .zshrc so that stow won't fail
# Preserve pre-existing zsh configs so they can be sourced by our dotfiles
if [ -f ~/.zshrc ] && [ ! -L ~/.zshrc ]; then
mv ~/.zshrc ~/.zshrc.pre-dotfiles
fi
if [ -f ~/.zprofile ] && [ ! -L ~/.zprofile ]; then
mv ~/.zprofile ~/.zprofile.pre-dotfiles
fi
stow bin git terminal tmux vim zsh jj opencode -t $HOME
## Install nvm and Node.js 24
if ! command -v nvm &> /dev/null && [ ! -s "$HOME/.nvm/nvm.sh" ]; then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 24
fi
## Install GitHub Copilot CLI
npm install -g @githubnext/github-copilot-cli
## Install OpenCode
curl -fsSL https://opencode.ai/install | bash
## Install and configure oh-my-opencode plugin
bunx oh-my-opencode install --no-tui --claude=no --openai=no --gemini=no --copilot=yes
## NEOVIM setup
nvim --headless "+Lazy! sync" +qa
## Download Alacritty terminfo
curl -sSL https://raw.githubusercontent.com/alacritty/alacritty/master/extra/alacritty.info | tic -x -
## Mark dotfiles installation as complete
touch ~/.dotfiles_complete