This install is based on the [EFI boot stub](https://mth.st/blog/void-efistub/) blog entry of [Matthias Totschnig](https://mth.st/), the [Void Handbook](https://docs.voidlinux.org/about/index.html) and the Void Linux man pages. This guide focuses on a Void Linux x86_64 glibc/musl install on uefi. In this install gummiboot is used as bootloader and the root partition will be encrypted.
First off the drive should be partitioned, possibly with fdisk. It should have atleast two partitions with one `EFI System` Partition and one `Linux filesystem` partition.
The "base-system" needs to be installed to the mounted drive. For this installation there is also other packages which are needed like NetworkManager, gummiboot and cryptsetup.
In the post install section the installation and configuration of certain applications are elaborated. With the use of the config-files in this repository.
To obtain these config-files the void-desktop repository may be cloned with the `git` command.
NetworkManager will be used as Network daemon due to its versatility. The package was already installed with the installation, thereby it only needs to be symlinked to `/var/service` to function.
```
# ln -s /etc/sv/NetworkManager /var/service
```
NetworkManager needs the `dbus` daemon to function, in general most other applications that will be discussed in the Post install section need `dbus`. To symlink `dbus` to `/var/service`:
```
# ln -s /etc/sv/dbus /var/service
```
Then, NetworkManager may be configured to enhance the security of the system. This is especially useful for laptops etc. To do this edit `/etc/NetworkManager/NetworkManager.conf`.
```
[device-mac-randomization]
wifi.scan-rand-mac-address=yes
[connection-mac-randomization]
ethernet.cloned-mac-address=random
wifi.cloned-mac-address=random
```
### Users
A user should be added to improve security of the system.
The package `sudo` that is present in the `base-system` package will be removed. Since, it is bloatware. To persist this. That is sudo will not be installed ever again on the system. Edit `/etc/xbps.d/xbps.conf` and insert:
```
ignorepkg=sudo
```
Then remove `sudo`.
```
# xbps-remove -y sudo
```
The `sudo` package will be replaced by `opendoas`. To install it:
```
# xbps-install -Sy opendoas
```
Symlink it to `/bin/sudo` so that applications which require root can still be granted by the user.
```
# ln -s /bin/doas /bin/sudo
```
And edit `/etc/doas.conf` to give users in the `wheel` group access to the `doas` command.
```
permit persist :wheel as root
```
To finalize this section, the `.bashrc` and `.bash_profile` configuration files will be copied to the home space of the user.
It might be desirable to install an LTS kernel for better stability. This can be done by:
```
# xbps-install -Sy linux-lts linux-lts-headers
```
To uninstall the non-lts kernel, ignore the package through `/etc/xbps.d/xbps.conf` by adding:
```
ignorepkg=linux
```
And then removing the `linux` meta package and its dependecies:
```
# xbps-remove -Ry linux
```
### Localtime
A "Network Time Protocol Daemon" (nptd for short) can sync the system clock with internet standard time servers. The `chrony` daemon is used as ntpd. Install it by:
Swap can be utilised by the system to free up space in RAM. For most use cases it is recommend to create a swapfile that is one and a half times the size of your RAM.
There is also our unnofficial extra repository for some additional packages and some packages which are needed for the graphical installation. To use those add them to `/etc/xbps.d/00-repository-ample.conf`,
To obtain enhanced battery lifespan, `tlp` and `tlpui` may be installed. The `tlpui` application may be used to monitor the general configuration of `tlp`.
Edit `/etc/tlp.d/00-template.conf` to set the battery usage to a more conservative setting.
```
CPU_ENERGY_PERF_POLICY_ON_AC=performance
CPU_ENERGY_PERF_POLICY_ON_BAT=power
```
The `tlp` service needs to be activated and also the `acpid` deamon is a necessity regarding obtaining all laptop functionality. Such as, brightness control, suspend when closing the lid etc.
To use a graphical enviroment it is necessary to start a seat and session manager. For a minimal install it is recommended to use `seatd`, `turnstile` and `polkit`. To install those run:
To be able to use `seatd` it is necessary that the user is added to the `_seatd` group.
```
# usermod -aG _seatd <user>
```
For `turnstile` to function configure `/etc/pam.d/system-login` by adding the line:
```
session optional pam_turnstile.so
```
Make sure turnstile also creates a *Runtime Directory* by enabling it in `/etc/turnstile/turnstiled.conf`.
```
manage_rundir = yes
```
### Login manager
To make it easier to log into the system, set up a login manager. For a minimal and wayland-compatible login manager use `greetd` with `gtkgreet`. Install them with:
```
# xbps-install -Sy greetd gtkgreet-git
```
Because Wayfire gets used as window manager for this install, that also means that it can be utilised as the login greeter.
A specific wayfire bash script for greetd may be created in `/usr/local/bin`. That exports all the essential environment variables for the login session.
There are many different window managers and desktop environments which can provide a decent experience. Wayfire is a functional, relatively lightweight and good looking wayland window manager and will be used for this install.
To install a barebones Wayfire use:
```
# xbps-install -Sy wayfire
```
To be able to configure Wayfire and have a gtk theme install:
To use the gtk theme. Configure it with `dconf-editor` under `org.gnome.desktop.interface.gtk-theme` and for icons under `org.gnome.desktop.interface.icon-theme`. If these directories do not exist, than that possibly means that a gtk application has not yet ran on the system.
A custom bash script may be created in `/usr/local/bin`. That exports all the essential environment variables for the session.
To configure the displays of the systems it's necessary to either configure them through `.config/wayfire.ini` or use an external application like `kanshi`. To install kanshi and a GUI to configure the displays:
Change the latitude, longitude and color-temperature according to your location and preference.
### Taskbar
For the taskbar it is recommended to use Waybar since it's wayland native and has enough functionality. Furthermore network manager applet will be used to display network status and to easily configure network settings.
To install both, in combination with some necessary fonts.
Waybar may be configured by editing `.config/waybar/config`.
```
$ cp -r void-desktop/config-files/waybar .config/
```
Also make sure that Waybar and network-manager-applet are started by Wayfire.
```
[autostart]
bar = waybar
network = sleep 5; nm-applet --indicator
```
### Application launcher
An application launcher may be used to easily start applications in Wayfire.
#### Tofi
For a fast and lightweight application launcher it's recommended to use `tofi` which starts in a few miliseconds if configured correctly. To install it:
```
# xbps-install -Sy tofi
```
Tofi can be configured by editing `.config/tofi/config`.
```
cp -r void-desktop/config-files/tofi .config/
```
To launch tofi through a keybind it has to be bound in `.config/wayfire.ini`.
Although the `wofi` package is no longer maintained and is generally less optimised compared to `tofi` it does have some important features that `tofi` does not have. Such as, a better positioning protocol.
To install the `wofi` package.
```
# xbps-install -Sy wofi
```
Wofi may be configured by editing `.config/wofi/config`.
```
$ cp -r void-desktop/config-files/wofi .config/
```
Wofi may be launched with a keybind, thereby edit `.config/wayfire.ini`.
```
[command]
binding_launcher = <super> KEY_S
command_launcher = wofi --show drun
```
#### Wlogout
Wlogout may be used as a specific launcher for power management options. Such as, reboot, suspend and to power off the system.
To install the `wlogout` package.
```
# xbps-install -Sy wlogout
```
Wlogout can be configured by editing `.config/wlogout/layout`.
Wlogout can be launched with a keybind, thereby edit `.config/wayfire.ini`.
```
[command]
binding_wlogout = <super> KEY_P
command_wlogout = wlogout
```
Wlogout needs permission to shutdown the system. This permission can be given by creating `/etc/polkit-1/rules.d/00-power-management.rules` and inserting.
For a more robust notification deamon it's recommended to use SwayNotificationCenter which also provides a *notifications center* which can be heavily customised.
`udiskie` needs to be started in Wayfire. This can be obtained by editing `.config/wayfire.ini`.
```
[autostart]
automount = udiskie -As
```
Furthermore, `udiskie` needs permission to mount drives, this permission can be given by creating `/etc/polkit-1/rules.d/00-mounting.rules` and inserting: