-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup-codespaces.sh
executable file
·65 lines (47 loc) · 1.61 KB
/
setup-codespaces.sh
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
#!/bin/sh
set -eux
if [ ! -d $HOME/dotfiles ]; then
mv /workspaces/.codespaces/.persistedshare/dotfiles $HOME/dotfiles
fi
cd $HOME
# Make passwordless sudo work
export SUDO_ASKPASS=/bin/true
# Apt shouldn't ask any questions
export DEBIAN_FRONTEND=noninteractive
# Change shell to zsh
sudo chsh "$(id -un)" --shell "/usr/bin/zsh"
# Install useful packages
sudo -E apt-get update
sudo -E apt-get install -y tree libfuse2 stow
# Install neovim
# Ubuntu is the worst
curl -L -o nvim.appimage https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
sudo install -vD -m 755 nvim.appimage /usr/local/bin/nvim
rm nvim.appimage
# Eza (better ls)
wget -c https://github.com/eza-community/eza/releases/latest/download/eza_x86_64-unknown-linux-gnu.tar.gz -O - | tar xz
sudo install -vD -m 775 eza /usr/local/bin
rm eza
# Hub CLI
wget -c https://github.com/mislav/hub/releases/download/v2.14.2/hub-linux-amd64-2.14.2.tgz -O - | tar xz
sudo ./hub-linux-amd64-2.14.2/install
rm -rf hub-linux-amd64-2.14.2
# zoxide
curl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | sh
# direnv
curl -sfL https://direnv.net/install.sh | bash
# lazydocker
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
cd dotfiles
stow nvim ruby zsh git
# Setup zsh
# Install starship
curl -sS https://starship.rs/install.sh -o install-starship.sh
sh install-starship.sh -y
rm install-starship.sh
# Setup Neovim
# Install lazyvim plugins
$HOME/bin/nvim --headless -c 'luafile install-lazynvim.lua' -c 'qall'
# Setup Direnv
cd /workspaces/${RepositoryName}
direnv allow