-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.txt
281 lines (214 loc) · 7.26 KB
/
install.txt
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
https://ctlos.github.io/wiki/btrfs/btrfs-part1/
https://wiki.archlinux.org/index.php/Lenovo_IdeaPad_720s_(Ryzen)
# enable networking
rfkill unblock all
wifi-menu
# prepare partitioning
cfdisk /dev/nvme0n1
mkfs.vfat /dev/nvme0n1p1
mkfs.btrfs /dev/nvme0n1p2
mount /dev/nvme0n1p2 /mnt
btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@snapshots
btrfs subvolume create /mnt/@home
umount /mnt
mount -o subvol=@,relatime,compress=lzo,space_cache,autodefrag /dev/nvme0n1p2 /mnt/
mkdir -p /mnt/boot/efi /mnt/home
mount /dev/nvme0n1p1 /mnt/boot/efi
mount -o subvol=@snapshots,relatime,compress=lzo,space_cache,autodefrag /dev/nvme0n1p2 /mnt/snapshots
mount -o subvol=@home,relatime,compress=lzo,space_cache,autodefrag /dev/nvme0n1p2 /mnt/home
# install base system
pacstrap /mnt base base-devel linux linux-firmware
# generate fstab
genfstab -U /mnt >> /mnt/etc/fstab
# chroot
arch-chroot /mnt
# install base packages (npm is needed for coc)
pacman -S git sudo gvim zsh npm gopls
# install zsh plugins
pacman -S zsh-syntax-highlighting, autosuggestions
git clone https://github.com/ohmyzsh/ohmyzsh ~/.oh-my-zsh
git clone https://github.com/romkatv/powerlevel10k/ ~/.oh-my-zsh/themes/powerlevel10k/
# Add user
useradd -m -G wheel,audio,video,storage,lp,power -s /bin/zsh kvaps
# Set passwords
passwd
passwd kvaps
# Configure sudo
EDITOR=vim visudo
#%wheel ALL=(ALL) ALL
# setup hostname
cat /etc/hostname
kvaps-laptop
# setup locale
cat /etc/locale.gen
en_US.UTF-8
en_DK.UTF-8
ru_RU.UTF-8
locale-gen
cat /etc/locale.conf
LANG=en_US.UTF-8
LC_TIME=en_DK.UTF-8
LC_CTYPE=en_US.UTF-8
# setup font
cat /etc/vconsole.conf
KEYMAP=ruwin_cplk-UTF-8
FONT=cyr-sun16
# setup timezone
ln -sf /usr/share/zoneinfo/Europe/Prague /etc/localtime
# install NetworkManager
pacman -S networkmanager network-manager-applet networkmanager-openvpn
systemctl enable NetworkManager
# install YaY
su kvaps
cd /tmp
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
# create initcpio image
pacman -S btrfs-progs
mkinitcpio -p linux
# install grub and microcode
pacman -S grub efibootmgr amd-ucode
grub-install
grub-install --removable
vim /etc/default/grub
#GRUB_TIMEOUT=1
#GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.noretry=0"
grub-mkconfig -o /boot/grub/grub.cfg
# Fix touchpad (https://github.com/Syniurge/i2c-amd-mp2/issues/3)
echo "softdep i2c_hid pre: pinctrl_amd" > /etc/modprobe.d/i2c-touchpad.conf
# umount and reboot
umount -R /mnt
reboot
# -------------------------------------------
# start network
rfkill unblock all
nmcli d wifi list
nmcli d wifi connect <WiFiSSID> password <WiFiPassword>
# install xorg
pacman -S xorg-server xf86-input-libinput libinput xterm xorg-xinit xorg-xclipboard xclip xf86-video-amdgpu scrot xsel xdotool mesa-demos
yay -S xcwd-git
# install lightdm and enable autologin
yay -S lightdm lightdm-autologin-greeter-git accountsservice
groupadd -r autologin
usermod -a -G autologin kvaps
vim /etc/lightdm/lightdm.conf
#[SeatDefaults]
#autologin-user=kvaps
#autologin-user-timeout=0
#session-wrapper=/etc/lightdm/Xsession
#pam-service=lightdm-autologin
#user-session=awesome
# install alacritty
pacman -S alacritty
# install backlight
pacman -S acpilight
cat /etc/udev/rules.d/backlight.rules
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
# install pipewire and bluetooth
pacman -S pipewire pipewire-alsa pipewire-pulse pavucontrol blueman
systemctl start bluetooth
# install fonts
pacman -S ttf-dejavu noto-fonts noto-fonts-cjk noto-fonts-emoji
yay -S nerd-fonts-dejavu-complete
# install proprietary amd driver
vim /etc/pacman.conf # uncoment multilib
git clone https://aur.archlinux.org/amdgpu-pro-installer.git
cd amdgpu-pro-installer
makepkg -si
# install earlyoom
pacman -Sy earlyoom
systemctl enable --now earlyoom
# install displaylink driver
yay -S displaylink evdi-amd-vmap-texture
echo "options evdi vmap_texture=1" | sudo tee /etc/modprobe.d/evdi.conf
dkms status
systemctl enable displaylink
systemctl start displaylink
# Enable Early KMS start
vim /etc/mkinitcpio.conf
#MODULES=(amdgpu)
mkinitcpio -p linux
# setup xorg configs
git clone https://github.com/kvaps/dotfiles
cp dotfiles/X11/xorg.conf.g/* /etc/X11/xorg.conf.d/
# Ignore powerbutton
echo 'HandlePowerKey=ignore' | sudo tee -a /etc/systemd/logind.conf
# install window manager and useful tools/widgets
pacman -S awesome arandr autorandr volumeicon cbatticon kmix solid lxappearance-gtk3 faenza-icon-theme translate-shell sysstat ntfs-3g
#pacman -S sway wdisplays
# Install themes and icons
yay -S mojave-gtk-theme kvantum-qt5 tela-icon-theme
# Install i3lock
yay -S i3lock-cac03-git
# install firefox
pacman -S firefox
# Firefox theme
https://addons.mozilla.org/ru/firefox/addon/contrast-gray/
https://addons.mozilla.org/en-US/firefox/addon/gray-theme-for-firefox/
https://addons.mozilla.org/ru/firefox/addon/google-chrome-dark/
# about:config
# browser.link.open_newwindow.restriction=0
# install filemanagers and the rest
pacman -S dolphin konsole thunar filezilla gvfs-mtp android-udev xdg-user-dirs keepassxc ark
yay -S dropbox
xdg-mime default org.kde.dolphin.desktop inode/directory
xdg-user-dirs-update
# install ssh-agent
https://stackoverflow.com/a/38980986/2931267
# install office things
pacman -S libreoffice okular pdfarranger
# install useful tools
pacman -S bash-completion man openssh jq git-crypt bind-tools thefuck code cowsay dmidecode lsof screen gpg zip unzip p7zip neofetch rsync pv pwgen whois usbutils dhcpcd traceroute tftp-hpa inotify-tools qbittorrent wget
# install and configure automatic btrfs snapshots
pacman -S snapper
systemctl start snapper-timeline.timer
systemctl enable snapper-timeline.timer
systemctl start snapper-cleanup.timer
systemctl enable snapper-cleanup.timer
umount /.snapshots
rmdir /.snapshots
snapper -c root create-config /
btrfs subvolume delete /.snapshots
mkdir /.snapshots
mount /.snapshots
snapper -c root create --description clean_install
yay -S snap-pac snap-pac-grub grub-btrfs
# -------------------------------------------
# install mikrotik winbox
yay -S winbox
# install ansible and modules
pacman -S ansible python-jmespath python-netaddr
yay -S python-openshift
# install opennebula tools
yay -S opennebula-tools
# install docker and kubernetes tools
pacman -S docker kubectl skopeo
systemctl enable docker
systemctl start docker
usermod -a -G docker kvaps
yay -S kubernetes-helm-bin qbec kubectl-krew
kubectl krew index add kvaps https://github.com/kvaps/krew-index
kubectl krew install kvaps/build
kubectl krew install kvaps/node-shell
kubectl krew install kvaps/use
# install graphic packets
pacman -S eog gimp darktable imagemagick kdenlive audacity hugin
# install video packets
pacman -S mpv vlc
# install audacious and audioplugins
sudo pacman -S audacious faad2 ffmpeg flac imlib2 libcddb libmad libsamplerate libsndfile libvorbis libx11 libzip mpg123 wavpack nmap easytag python-mutagen
# install simplescreenrecorder
pacman -S simplescreenrecorder
# install time tracker
yay -S toggldesktop
# install cups and printer drivers
pacman -S cups
echo 'xdg-open http://localhost:631/' > /usr/local/bin/cups
chmod +x /usr/local/bin/cups
systemctl start org.cups.cupsd.service
systemctl enable org.cups.cupsd.service
echo a4 > /etc/papersize
yay -S cnrdrvcups-lb-bin