-
Notifications
You must be signed in to change notification settings - Fork 4
/
bootstrap.sh
executable file
·140 lines (119 loc) · 3.59 KB
/
bootstrap.sh
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/bash -l
set -ex
shopt -s nullglob globstar
# Prepare git dir
mkdir -p ~/git
cd ~/git
# Install AUR helper
echo '==> Installing AUR helper'
sudo pacman --noconfirm --needed -S git git-lfs
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si --noconfirm
echo '==> Installing sound packages'
yay -S --noconfirm --mflags --skipinteg \
pipewire \
pipewire-alsa \
pipewire-jack \
pipewire-pulse \
gst-plugin-pipewire \
libpulse \
wireplumber
echo '==> Installing extra packages'
yay -S --noconfirm --mflags --skipinteg \
mkinitcpio-firmware \
net-tools dosfstools \
xdg-utils xdg-user-dirs \
iw \
stow zsh tmux ripgrep mlocate btop \
neovim-nightly-bin ctags less bat fswatch difftastic \
pass pass-otp \
httpie sshpass stoken openvpn vpn-slice openconnect tinyproxy wget jq \
tlp rate-mirrors unzip fuse2 bc brightnessctl \
p7zip man-db alsa-utils keyd fastfetch socat systemd-resolvconf pacman-contrib
echo '==> Installing development packages'
yay -S --noconfirm --mflags --skipinteg \
jdk8-openjdk openjdk8-doc openjdk8-src \
jdk-openjdk openjdk-doc openjdk-src \
python-pip python-dbus python-opengl python-virtualenv \
dotnet-sdk aspnet-runtime \
maven npm asdf-vm \
github-cli lazygit \
docker docker-compose \
azure-cli kubctl k9s \
postman
pip3 install --break-system-packages https://github.com/dlenski/rsa_ct_kip/archive/HEAD.zip
npm install -g httpyac
echo '==> Installing desktop packages'
yay -S --noconfirm --mflags --skipinteg \
fonts-meta-base \
terminus-font terminus-font-ttf ttf-terminus-nerd \
udiskie \
gammastep geoclue2 \
dunst \
yambar-git \
alacritty \
zathura zathura-pdf-mupdf \
qutebrowser python-adblock \
mpv yt-dlp \
dropbox dropbox-cli vesktop boosteroid stremio steam calibre \
stalonetray xdotool krita \
gpu-screen-recorder-git
echo '==> Installing dotfiles'
cd ~/git
git clone https://github.com/deathbeam/dotfiles || true
cd dotfiles
make
echo '==> Configuring system'
# Enable bitmap fonts (we need them to correctly render Terminus)
sudo rm -rf /etc/fonts/conf.d/70-no-bitmaps.conf
fc-cache -f
# Increase inotify watches
sudo tee -a /etc/sysctl.d/40-inotify.conf <<EOF
fs.inotify.max_user_watches=1000000
fs.inotify.max_queued_events=1000000
EOF
# Symlink configs
sudo ln -s ~/git/dotfiles/keyd/default.conf /etc/keyd/default.conf
# Enable services
sudo systemctl enable \
keyd \
tlp
# Alter pacman options
sudo sed -i '/\[options\]/a Color' /etc/pacman.conf
sudo sed -i '/\[options\]/a ILoveCandy' /etc/pacman.conf
sudo sed -i '/\[options\]/a ParallelDownloads = 10' /etc/pacman.conf
# Modify groups
sudo groupadd -f vboxsf
sudo usermod -aG vboxsf "$USER"
sudo groupadd -f docker
sudo usermod -aG docker "$USER"
sudo groupadd -f nogroup
sudo usermod -aG nogroup "$USER"
sudo groupadd -f video
sudo usermod -aG video "$USER"
sudo groupadd -f input
sudo usermod -aG input "$USER"
# Update XDG
xdg-user-dirs-update
# Set default browser
xdg-settings set default-web-browser qutebrowser.desktop
# Change default shell
sudo chsh -s /bin/zsh "$USER"
# Disable power save
sudo iw dev wlan0 set power_save off
# Ask user if they want to setup optional services if we are in interactive session
if [ ! -t 0 ]; then
exit 0
fi
echo '==> Setting up optional services'
scriptpath=$(dirname "$(readlink -f "$0")")
for file in "$scriptpath"/bootstrap-*.sh
do
name=$(basename "$file" .sh)
name=${name#bootstrap-}
read -p "Do you want to setup $name? (y/n) " answer
if [[ $answer = [yY] ]]; then
bash "$file"
fi
done