Setting up Alpine Linux with i3wm on my Thinkpad T420
Getting Started
Go through the normal installer, set up according to taste and make sure to choose ‘sys’ unless you know what you’re doing (in which case, why are you reading this?)
apk add mosh micro doas i3wm i3status dmenu i3lock chromium qutebrowser vim rsync hugo st tmux bash mandoc pandoc acpid xsetroot setxkbmap powertop iwd docs git brightnessctl
note: remove the ‘docs’ and ‘mandoc’ packages if you don’t care about having local documentation handy.
Setting up doas
As root:
addgroup user wheel
We installed doas, now we just have to make sure that your non-root user can make use of it:
edit /etc/doas.conf (should be populated automatically) and uncomment the following line:
permit persist :wheel
Setting up i3 and Xorg
doas setup-xorg-base
doas addgroup user audio
doas addgroup user video
doas addgroup user input
doas apk add xorg-server xf86-video-intel xf86-input-synaptics xinit
touch .xinitrc ; echo “exec i3” » .xinitrc
reboot
log in
startx
Power Saving
Get some tunables going with powertop. I didn’t do much else and am getting a solid 9 hours out of the 9 cell.
`doas powertop
Configure Wifi
edit /etc/iwd/main.conf
add dhcpcd instead
change EnableNetworkConfiguration to True
disable wpasupplicant:
rc-update delete wpa_supplicant boot
rc-update add iwd boot
configure wifi
Audio
doas apk add pulseaudio pulseaudio-utils pulseaudio-alsa
(need this for pactl to work)
doas rc-update add pulseaudio default?
Decent fonts:
doas apk add font-terminus font-inconsolata font-dejavu font-noto font-noto-cjk font-awesome font-noto-extra
Dotfiles I like to add:
copy over:
.xinitrc
.Xresources
.i3status.conf
.config/i3/config
.bashrc (optional)
micro /etc/passwd, change to bash if you’d like.
Setting Up SyncThing
doas apk add syncthing syncthing-openrc
doas rc-update add syncthing boot
create the file /etc/conf.d/syncthing
with the contents ‘SYNCTHING_USER=YOUR_USERNAME_HERE’
Then change the permissions on /var/lib/syncthing:
chown YOUR_USERNAME_HERE:users /var/lib/syncthing
reboot