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.
```
# useradd <user>
```
The user may be added to certain groups, to give it some rights.
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:
```
# xbps-install -Sy chrony
```
Then to active its service:
```
ln -s /etc/sv/chronyd /var/service
```
To configure the timezone to your own edit the `/etc/rc.conf` file and set these lines:
```
HARDWARECLOCK="localtime"
TIMEZONE=("Europe/Amsterdam")
```
### Using Swap
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 use a graphical enviroment it is necessary to start a seat and session manager. For a minimal install it is recommended to use `seatd`, `dumb_runtime_dir` and `polkit`. To install those run:
```
# xbps-install -Sy seatd dumb_runtime_dir polkit
```
Then to enable them:
```
# ln -s /etc/sv/seatd /var/service
# ln -s /etc/sv/polkitd /var/service
```
And for `dumb_runtime_dir` to function, configure `/etc/pam.d/system-login` by uncommenting:
```
session optional pam_dumb_runtime_dir.so
```
For some sane polkit rules add these lines to `/etc/polkit-1/rules.d/00-polkit.rules`:
```
polkit.addRule(function(action, subject)
{
if (action.id == "org.freedesktop.policykit.exec" && action.lookup("program") == "/bin/shutdown" && subject.isInGroup("wheel"))
return polkit.Result.YES;
});
polkit.addRule(function(action, subject)
{
if (action.id == "org.freedesktop.policykit.exec" && action.lookup("program") == "/bin/zzz" && subject.isInGroup("wheel"))
return polkit.Result.YES;
});
polkit.addRule(function(action, subject)
{
if (action.id.startsWith("org.freedesktop.udisks2.") && subject.isInGroup("storage"))
return polkit.Result.YES;
});
```
Or for the more lazy under us copy `void-desktop/config-files/polkit/00-polkit.rules` to `/etc/polkit-1/rules.d/`.
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
```
### Window manager
There are many different window managers and desktop enviroments which can provide a decent experience. Wayfire is a functional, relativily lightweight and good looking wayland window manager and will be used for this install.