Stable Void Linux Setup Guide September 6, 2020 on Kenneth Dodrill's blog Updated on February 19, 2023

Table of Contents

NOTE: This guide has specific installation instructions for a desktop environment including dbus, seatd, iwd, pipewire, and a window manager (I’m using sway). If that’s not what you’re here for, you can still follow the steps below and roll with whatever you like (GNOME, KDE, etc).

Intro

I won’t bore you with the basics. You’re here because you don’t want to be running Ubuntu. Void is like Arch in the way of having total customization over your packages, with a start-from-scratch mentality. You don’t mind spending 4 hours setting up your system because you want it to be your system.

I am assuming that you have a basic install of Void ready to go. If not, feel free to tag along with a VM, or you can just continue to read. That being said, I do have a couple of notes on the install process that some may not know about.

What this guide is

Initially, I wanted this to be more general and less personalized. However, as I was going through a re-installation of Void Linux I realized that the Void Linux documentation is just so good that much of what I was going to say started to make less sense. This guide will be fairly personalized, but I believe that a decent amount of people will get certain things from it that could improve their system or make them think about all that they have installed.

Installation notes

NOTE: If you would like to encrypt your drive, please follow the official Void Linux guide. Otherwise, continue with the below paragraph.

Before you run the installer, start up dhcpcd. Then, link wpa_supplicant and start that, too. Go through wpa_supplicant to get connected to the internet. Once that’s done, run the installer and fill out all the fields. In my experience, trying to connect to the internet without starting both services resulted in an error if I tried to update my system. Running just wpa_supplicant is also not enough because your DNS settings will not copy over from installation. I have tried re-connecting but for some reason running dhcpcd first was the only way to get things to really ‘work’.

Post Installation

Initial internet and repository setup

Absolutely your first step should be to link and start dhcpcd and wpa_supplicant. Verify your connection (it should work fine if you followed the steps above), then update the system.

xbps-install -Su

Enable repositories:

xbps-install void-repo-nonfree void-repo-multilib void-repo-multilib-nonfree

Make a new user and login to it (recommended before the next steps)

useradd name
passwd name

Check the void docs for sudo permissions and also about adding to other groups (if using seatd).

Change mirrors (seriously helps with download speeds, see a list of mirrors here):

xbps-install xmirror
xmirror
xbps-install -S

Basic packages

Install any basic packages that you might want, here are my personal preferences:

xbps-install vim zsh curl git gnupg lf

System-critical packages

Install dbus, enable it and reboot (logging in/out might cause issues, a reboot will ensure that dbus is started properly):

xbps-install dbus
ln -s /etc/sv/dbus /var/service/dbus
reboot

Install seatd, enable the service, add your user to the _seatd group:

xbps-install seatd
ln -s /etc/sv/seatd /var/service/seatd
usermod -aG _seatd $USER

Graphical drivers, WM, XDG_RUNTIME_DIR

Install graphics drivers. I am using an AMD graphics card:

xbps-install mesa-dri

Install xdg packages:

xbps-install xdg-user-dirs xdg-utils xdg-desktop-portal-wlr

Install WM of choice and additional utilities:

xbps-install sway swaylock mako grim slurp clipman wl-clipboard wlsunset bemenu foot

Write login file to set up XDG_RUNTIME_DIR:

if test -z "${XDG_RUNTIME_DIR}"; then
  export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
  if ! test -d "${XDG_RUNTIME_DIR}"; then
    mkdir "${XDG_RUNTIME_DIR}"
    chmod 0700 "${XDG_RUNTIME_DIR}"
  fi
fi

dbus-run-session sway

Audio, internet, and firewall

I use pipewire for audio, which can replace alsa and pulseaudio. You’ll still need alsa installed, and there are a couple more steps listed in the docs.

xbps-install alsa-utils pipewire alsa-pipewire

Now it’s time to set up iwd, a package that aims to replace wpa_supplicant.

xbps-install iwd openresolv

unlink /var/service/wpa_supplicant
unlink /var/service/dhcpcd

I use openresolv and enable iwds network so I don’t need dhcpcd.

/etc/iwd/main.conf

[General]
UseDefaultInterface=true
EnableNetworkConfiguration=true

[Network]
NameResolvingService=resolvconf
ln -s /etc/sv/iwd /var/service/iwd

sv start iwd
iwctl
# ...go through setup here to scan and connect to a network.

For a firewall, I just roll with a basic install of ufw.

xbps-install ufw
ufw enable
ln -s /etc/sv/ufw /var/service/ufw

Font

Fonts in Void Linux have had an interesting past. You can probably find many posts on reddit or blogs about fonts on void. I have switched between many different fonts and configurations, and I have found the below to be the best. It’s simple and I like it. I’m also using mononoki as my text editor font.

xbps-install noto-fonts-ttf
xbps-install noto-fonts-emoji
# Optionally install this for CJK fonts (Chinese, Japanese, Korean)
xbps-install noto-fonts-cjk

ln -s /usr/share/fontconfig/conf.avail/10-hinting-slight.conf /etc/fonts/conf.d/
ln -s /usr/share/fontconfig/conf.avail/50-user.conf /etc/fonts/conf.d/

If you are using Firefox, you may want to set gfx.font_rendering.fontconfig.max_generic_substitutions = 127 in your about:config.

Date & Time

Fairly simple stuff here, just install ntp and one of the implementations of it. Personally, I lean towards chrony. Then ln -s /etc/sv/chronyd /var/service/chronyd. You can also link your timezone (recommended) to the system by doing ln -sf /usr/share/zoneinfo/<timezone> /etc/localtime.

Conclusion

I hope you have enjoyed this guide. I wrote this all down mostly for myself, so I can remember all the steps taken and save some time in-case I have to reinstall Void in the future. I also decided to write this because I see a lot of similar questions in r/voidlinux, and I hope this can help.

back to top