-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_onchange_install-packages.sh.tmpl
85 lines (63 loc) · 2.96 KB
/
run_onchange_install-packages.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/sh
CYAN='\033[0;36m'
LCYAN='\033[1;36m'
RESET='\033[0m'
{{ if (and (eq .chezmoi.distro.like "debian") (not (eq .chezmoi.chassis "kasm"))) -}}
# Install Starship
echo "${LCYAN}###${RESET} Starship install"
if [ ! "$(command -v starship)" ]; then
echo "${CYAN}###${RESET} Installing Starship prompt"
curl -sS https://starship.rs/install.sh | sh -s -- -y
fi
echo "${LCYAN}###${RESET} apt-get install (common)"
# Update repos
sudo apt-get update
# Install Eza
if [ ! -f /etc/apt/sources.list.d/gierens.list ]; then
echo "${CYAN}###${RESET} Adding docker repository"
sudo mkdir -p /etc/apt/keyrings
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg
echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
sudo chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list
sudo apt-get update
fi
sudo apt-get install -y bat direnv eza fd-find fzf ripgrep rust-tealdeer ugrep yq
# Install ZOxide
curl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | sh
# Install Fastfetch
curl -sSL https://alessandromrc.github.io/fastfetch-installer/installer.sh | bash
{{ if and (ne .chezmoi.chassis "ephemeral") (ne .chezmoi.chassis "beepy") -}}
# Add docker repository
if [ ! -f /etc/apt/sources.list.d/docker.list ]; then
echo "${CYAN}###${RESET} Adding docker repository"
curl -fsSL https://download.docker.com/linux/{{.chezmoi.distro.name}}/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/{{.chezmoi.distro.name}} $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
fi
echo "${LCYAN}###${RESET} apt-get install (dev)"
# Update repos
sudo apt-get update
# Install packages
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
echo "${LCYAN}###${RESET} Atuin install"
# Install Atuin
curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh | sh -s
{{ end -}}
{{ else if eq .chezmoi.distro.like "suse opensuse" -}}
echo "${LCYAN}###${RESET} Zypper install (common)"
# Refresh repos
sudo zypper refresh
# Basic utilities
sudo zypper -n install starship direnv fd jq eza atuin zoxide tealdeer docker docker-compose docker-buildx
{{ else if eq .chezmoi.distro.name "darwin" -}}
if [ "$(command -v brew)" ]; then
echo "${CYAN}###${RESET} Homebrew install"
brew tap hashicorp/tap
# Cross-plat
brew install 1password/tap/1password-cli age atuin bat direnv docker docker-compose eza fd-find fzf gnupg hammerspoon hurl nvm ripgrep starship tealdeer ugrep hashicorp/tap/vault wezterm yq zoxide
{{ if .flags.applesilicon -}}
echo "${LCYAN}###${RESET} Homebrew install (arm64)"
# M1 Mac
brew install colima
{{ end }}
fi
{{ end -}}