-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstraprc
executable file
·165 lines (141 loc) · 3.17 KB
/
bootstraprc
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# Bunch of utility functions to install arch linux from scratch.
assert_node_env() {
[ -f $HOME/.volta/bin/node ] &&
[ -f $HOME/.volta/bin/npm ] &&
[ -f $HOME/.volta/bin/tsc ] &&
[ -f $HOME/.volta/bin/prettierd ] &&
return 0
assert_yay && yay -S --needed volta-bin || return 1
volta install node npm typescript @fsouza/prettierd || return 1
}
assert_yay() {
[ -f /usr/bin/yay ] && return 0
sudo pacman -Sy --needed git base-devel || return 1
mkdir -p $HOME/git
pushd $HOME/git
[ -d yay ] || {
git clone https://aur.archlinux.org/yay.git || return 1
}
cd yay
makepkg -si || return 1
popd
}
install_dotfiles_deps() {
sudo pacman -S stow || return 1
assert_node_env
volta install convconv
}
install_drivers() {
local host=$(hostname)
sudo pacman -S --needed \
pipewire pipewire-audio pipewire-alsa pipewire-docs pipewire-pulse \
bluez bluez-utils || rteurn 1
case "$host" in
"peach")
sudo pacman -S --needed \
xf86-video-intel \
libva-intel-driver libva \
mesa \
vulkan-intel
;;
"black")
sudo pacman -S --needed \
xf86-video-amdgpu \
libva-mesa-driver libva \
mesa mesa-vdpau \
vulkan-radeon
;;
"lucy")
sudo pacman -S --needed \
xf86-video-intel xf86-video-amdgpu \
libva-intel-driver libva-mesa-driver libva \
mesa \
vulkan-intel vulkan-radeon
;;
*)
echo "installing drivers for $host is not implemented"
return 1
;;
esac
}
install_common() {
sudo pacman -S --needed \
openssh \
nfs-utils \
p7zip \
proxychains-ng \
usbutils \
socat gnu-netcat nmap \
lshw ncdu \
which \
cpupower \
xdotool \
bc \
yt-dlp transmission-cli \
iwd dhcpcd \
libimobiledevice usbmuxd \
rsync || return 1
assert_yay && yay -S --needed \
xray-bin tun2socks-bin || return 1
}
install_dev() {
sudo pacman -S --needed \
go gofumpt gopls \
entr \
cmake \
meson mesonlsp ninja \
clang gcc gdb make man-pages pkgconf \
python-pip pyenv python-black python-pylint \
re2c \
rust-analyzer rustup \
shfmt stylua \
base-devel \
cloc \
ctags \
bear || return 1
assert_node_env || return 1
assert_yay && yay -S --needed \
watchman-bin \
pup volta-bin || return 1
}
install_extra() {
sudo pacman -S --needed \
xournalpp \
android-tools scrcpy \
remmina freerdp libvncserver libvncserver \
wireshark-cli \
imagemagick || return 1
assert_yay && yay -S \
v4l2loopback-dkms v4l2loopback-utils || return 1
}
install_core() {
sudo pacman -S --needed \
fzf git git-lfs jq tmux unzip ripgrep nnn \
neovim grc htop man-db bash-completion
}
install_desktop() {
install_core || return 1
install_common || return 1
install_drivers || return 1
sudo pacman -S --needed \
xorg-server xorg-xinit xorg-xrandr \
picom \
i3-wm sxhkd \
xclip \
xfce4-terminal dunst slock dmenu \
feh telegram-desktop mpv \
zathura zathura-pdf-poppler \
gnome-themes-extra \
lxappearance nitrogen \
libnotify \
playerctl || return 1
assert_yay && yay -S --needed \
brave-bin \
dragon-drop \
noto-fonts noto-fonts-emoji \
vazirmatn-fonts vazir-code-fonts borna-fonts \
ttf-ubuntu-font-family ttf-ubuntu-mono-nerd \
simplescreenrecorder \
touchcursor-linux-git || return 1
}
# vi: ft=sh