-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprovision-linux
More file actions
executable file
·140 lines (123 loc) · 3.21 KB
/
provision-linux
File metadata and controls
executable file
·140 lines (123 loc) · 3.21 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
#!/usr/bin/env fish
source ./.config/fish/functions/log.fish
source ./.config/fish/functions/confirm.fish
set -l distro (awk -F= '/^ID=/ {print $2}' /etc/os-release)
test (uname) != Linux
and echo 'error: this script is for Linux only'
and exit 1
log "provisioning Linux environment for $USER ($distro)"
log "installing packages"
switch $distro
case arch cachyos
paru -S --needed --noconfirm \
asdf-vm \
bat \
brightnessctl \
btop \
curl \
docker \
docker-buildx \
docker-compose \
dunst \
fd \
ffmpeg \
fish \
fzf \
git \
git-delta \
git-lfs \
github-cli \
glow \
helium-browser-bin \
hypridle \
hyprlock \
hyprpaper \
jq \
k9s \
keyd \
kubectl \
lazydocker \
lazygit \
mkcert \
neovim \
obs-studio \
ouch \
pgcli \
polkit-kde-agent \
rancher-k3d-bin \
ripgrep \
rofi \
rsync \
starship \
tailscale \
tmux \
ttf-jetbrains-mono-nerd \
uv \
waybar \
wezterm-nightly-bin \
wl-clipboard \
zen-browser-bin \
zoxide
case ubuntu debian
sudo apt-get update
and sudo apt-get install -y \
bat \
btop \
curl \
fd-find \
ffmpeg \
fish \
fzf \
git \
git-lfs \
jq \
mkcert \
neovim \
pgcli \
ripgrep \
rsync \
tmux \
zoxide
case '*'
echo "error: unsupported distro '$distro'"
exit 1
end
or exit 1
./sync
or exit 1
log "setting up shell"
fish_add_path $HOME/.local/bin
if test $SHELL != (which fish)
chsh -s (which fish)
or exit 1
end
./scripts/fish_generate_completions.fish
or echo 'warning: failed to generate fish completions'
log "setting up terminal tools"
if not test -d ~/.config/tmux/plugins/tpm
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm >/dev/null 2>&1
or echo 'warning: failed to install tmux plugin manager'
end
if test -d ~/.config/tmux/plugins/tpm
~/.config/tmux/plugins/tpm/bin/install_plugins
or echo 'warning: failed to install tmux plugins'
end
if command -v git >/dev/null 2>&1
and git lfs version >/dev/null 2>&1
git lfs install
or echo 'warning: failed to initialize git-lfs'
end
log "setting up docker"
sudo systemctl enable --now docker.service
or echo 'warning: failed to enable docker'
if not groups $USER | grep -q docker
sudo usermod -aG docker $USER
echo 'added user to docker group (logout required to take effect)'
end
if command -q tailscale
sudo systemctl enable --now tailscaled.service
or echo 'warning: failed to enable tailscale'
end
./scripts/keyd_configure.fish
or echo 'warning: failed to set up keyd'
echo 'done provisioning Linux'