-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_once_10_install.sh.tmpl
executable file
·119 lines (89 loc) · 3.6 KB
/
run_once_10_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
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
#!/usr/bin/env bash
set -eux
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###
# Repos
###
{{- if eq .chezmoi.os "linux" }}
{{- if eq .chezmoi.osRelease.name "Fedora" }}
sudo dnf install -y \
fedora-workstation-repositories \
"https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm" \
"https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm"
sudo dnf config-manager --set-enabled google-chrome
sudo dnf config-manager --set-enabled fedora-cisco-openh264
# VS Code
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | \
sudo tee /etc/yum.repos.d/vscode.repo
# Tailscale
sudo dnf config-manager --add-repo https://pkgs.tailscale.com/stable/fedora/tailscale.repo
# Helix
sudo dnf copr enable -y varlad/helix
{{- else if eq .chezmoi.osRelease.name "Arch Linux" }}
sudo pacman -S --needed --noconfirm flatpak
{{- end }}
# Flathub
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
{{- end}}
###
# Install
###
{{- if eq .chezmoi.os "linux" }}
{{- if eq .chezmoi.osRelease.name "Fedora" }}
# DNF packages
sudo dnf install -y \
cmake ninja-build llvm llvm-libs clang automake gcc gcc-c++ \
python3-devel nodejs-devel nodejs npm texlive-scheme-tetex \
black pylint poetry python3-notebook mathjax sscg pandoc pandoc-pdf \
google-chrome-stable code mpv calibre \
langpacks-de langpacks-ja mozilla-openh264 iwd wireguard \
ffmpeg tokei bsdtar util-linux-user bat htop podman \
zsh fish starship exa syncthing fzf lsd tailscale \
ripgrep git-delta direnv zoxide helix
# DNF groups
sudo dnf groupinstall "Development Tools" "C Development Tools and Libraries" -y
# Flatpaks
sudo flatpak install -y flathub com.bitwarden.desktop
sudo flatpak install -y flathub com.discordapp.Discord
{{- else if eq .chezmoi.osRelease.name "Arch Linux" }}
if [[ ! -x "$(command -v paru)" ]]; then
git clone https://aur.archlinux.org/paru.git ~/Quellen/paru
makepkg --noconfirm -si ~/Quellen/paru
fi
paru -S --needed --noconfirm \
cmake ninja llvm llvm-libs clang base-devel python nodejs texlive-most \
topgrade fd pandoc pandoc-citeproc pandoc-crossref python-black google-chrome \
visual-studio-code-bin helix mpv calibre iwd wireguard-tools tokei htop podman \
zsh fish starship exa syncthing discord rustup topgrade yarn powershell-bin fzf \
lsd npm tailscale bitwarden-cli bitwarden-bin bat direnv git-delta zoxide
{{- end }}
{{- else if eq .chezmoi.os "darwin" }}
brew bundle --global {{ if eq .chezmoi.arch "arm64" }} || true {{- end }}
{{- end }}
# ZSH Plugs
if [[ ! -d ~/.zcomet/bin ]]; then
mkdir -p ~/.zcomet
git clone https://github.com/agkozak/zcomet.git ~/.zcomet/bin
fi
# Rust utils
if [[ ! -x "$(command -v rustup)" ]]; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y
fi
export PATH=~/.cargo/bin:"$PATH"
if [[ ! -x "$(command -v lolcow-fortune)" ]]; then
cargo install lolcow-fortune
lolcow-fortune download
fi
if [[ ! -x "$(command -v cargo-install-update)" ]]; then
cargo install cargo-update
fi
if [[ ! -x "$(command -v topgrade)" ]]; then
cargo install topgrade
fi
if [[ ! -x "$(command -v hexyl)" ]]; then
cargo install hexyl
fi