-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_once_install.sh.tmpl
63 lines (47 loc) · 1.45 KB
/
run_once_install.sh.tmpl
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
#!/usr/bin/env bash
set -euo pipefail
curl -L https://fly.io/install.sh | FLYCTL_INSTALL="${HOME}/.local/share/fly" sh
curl -fsSL https://bun.sh/install | BUN_INSTALL="${HOME}/.local/share/bun" bash
# NOTE: for gnome-shell-extension-installer
export PATH="${HOME}/.local/bin:${PATH}"
if [[ -n "${DEBUG:-}" ]]; then
set -x
fi
{{ if ne .chezmoi.os "linux" }}
{{ fail "Only Linux is supported at the moment!" }}
{{ end }}
# Install packages
{{ template "install-packages.tmpl" . }}
{{ if .setup_rust }}
curl https://sh.rustup.rs -sSf \
| env CARGO_HOME="${HOME}/.local/share/cargo" RUSTUP_HOME="${HOME}/.local/share/rustup" \
sh -s -- -y --no-modify-path
{{ end }}
{{ if .install_deno }}
curl -fsSL https://deno.land/x/install/install.sh \
| DENO_INSTALL=~/.local/share/deno sh
{{ end }}
{{ if .setup_gnome }}
# Setup GNOME
{{ template "setup-gnome.tmpl" . }}
{{ end }}
{{ if .fix_touchpad_speed }}
# Fix touchpad speed
{{ template "fix-touchpad-speed.tmpl" . }}
{{ end }}
sudo -v; curl https://rclone.org/install.sh | sudo bash || true
# Install nvm
# -----------
# Set PROFILE to prevent updating .zshrc
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh \
| PROFILE=/dev/null NVM_DIR=~/.local/share/nvm bash
. ~/.local/share/nvm/nvm.sh
nvm install node
chsh -s $(which zsh)
{{ if .setup_gnome }}
# TODO: add option to skip fonts installation
fc-cache -rf
gnome-session-quit
{{ else }}
zsh
{{ end }}