8bit avatar

PRACTICAL PARANOID

It's in that place where I put that thing that time


3 min | linux

Minimal i3 set up on Void Linux

Pixelated scene from the movie The Net with Angela Bennett chatting on IRC while eating pizza

Now that we have rebooted into our base install of void linux we are going to take care of setting up xorg, i3wm and a few other tools to transform the base install into a lean workstation.

The first step is to get an internet connection up and running!

If we are planning to use wifi all we need to to is adding a block with the connection details to the wpa supplicant config file and then enable the hook that will connect to the wifi before getting a new dhcp lease.

# add the connection details to the wpa_supplicant.conf
# replace the ssid and psw
wpa_passphrase ssid psw | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf

# enable the dhcp client hook
sudo ln -s /usr/share/dhcpcd/hooks/10-wpa_supplicant /usr/libexec/dhcpcd-hooks

Whether we are using wifi or ethernet we need to enable the dhcp client and then restart it to get a connection (I am assuming you are using a dhcp server on your router here).

# enable the dhcp client service
sudo ln -s /etc/sv/dhcpcd /var/service

# restart to get a new lease
# this may take a few seconds
sudo sv restart dhcpcd

# check the connection
ping -c 3 1.1.1.1

Now that we have a connection we can go ahead and install some base packages!

The list below is what I usually install but feel free to add or remove packages to your heart content.

sudo xbps-install -S \
    dmenu \
    firefox \
    git \
    i3 \
    keepassxc \
    mesa-dri \
    openntpd \
    syncthing \
    xdg-user-dirs \
    xfce4-terminal \
    xorg-minimal \
    xorg-fonts \
    xf86-input-libinput

You may have spotted from the list above that we are going to use OpenNTPD from the OpenBSD project as our daemon for network time sync.

Before we enable it we are going to replace the constraint in its config to ping cloudflare instead of google (as we don’t like google and we can barely tolerate cloudflare).

# replace the constraint in /etc/ntpd.conf
sudo sed -i "s/www.google.com/1.1.1.1/g" /etc/ntpd.conf

# enable the openntpd daemon
sudo ln -s /etc/sv/openntpd /var/service

Time to create the default folders for both the root and our user, we are going to use a simple tool, called xdg-user-dirs, to do so.

xdg-user-dirs-update
sudo su
xdg-user-dirs-update
exit

Last step before we can start xorg is to add a line to the .xinitrc so that the startx command can launch i3.

echo "exec i3" > $HOME/.xinitrc
startx

The last line will launch our xorg session with i3wm!

My next step is to clone my dotfiles and execute the installer script to set up the environment.