1156 lines
No EOL
26 KiB
Markdown
1156 lines
No EOL
26 KiB
Markdown
# A Void Linux install
|
|
|
|
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.
|
|
|
|
## Provisioning
|
|
|
|
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.
|
|
|
|
It should look something like this:
|
|
|
|
| Number of partition | Size | Type |
|
|
|:-----:|:-----:|:-----: |
|
|
| 1 | 1 to 2 GB or more | EFI System |
|
|
| 2 | Rest of the drive | Linux filesystem |
|
|
|
|
Then to create the filesystem of the efi partition.
|
|
|
|
```
|
|
# mkfs.fat -F 32 -n efi /dev/<disk1>
|
|
```
|
|
|
|
And the encrypted filesystem of the root partition.
|
|
|
|
```
|
|
# cryptsetup luksFormat /dev/<disk2> --type luks2 --label luks
|
|
# cryptsetup open --type luks /dev/<disk2> root
|
|
# mkfs.ext4 -L root /dev/mapper/root
|
|
```
|
|
|
|
Other filesystems can also be used but `ext4` is the standard for most linux distobutions.
|
|
|
|
## Installation
|
|
|
|
To install the Void Linux distribution on the system, the encrypted partition and the efi partition have to be mounted to the main system.
|
|
|
|
```
|
|
# mount /dev/mapper/root /mnt
|
|
# mkdir /mnt/boot
|
|
# mount /dev/<disk1> /mnt/boot
|
|
# for dir in dev proc sys run; do
|
|
> mkdir /mnt/$dir
|
|
> mount --rbind --make-rslave /$dir /mnt/$dir
|
|
> done
|
|
```
|
|
|
|
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.
|
|
|
|
* For glibc:
|
|
|
|
```
|
|
# xbps-install -Sy -R https://repo-default.voidlinux.org/current -r /mnt base-system cryptsetup gummiboot vim apparmor NetworkManager git
|
|
```
|
|
|
|
* For musl:
|
|
|
|
```
|
|
# xbps-install -Sy -R https://repo-default.voidlinux.org/current/musl -r /mnt base-system cryptsetup gummiboot vim apparmor NetworkManager git
|
|
```
|
|
|
|
To get internet inside the chroot whilst installing the system, copy over the `resolv.conf`.
|
|
|
|
```
|
|
# cp /etc/resolv.conf /mnt/etc/
|
|
```
|
|
|
|
Entering the chroot and configuring the system.
|
|
|
|
```
|
|
# chroot /mnt
|
|
# chown root:root /
|
|
# chmod 755 /
|
|
# passwd root
|
|
# echo <hostname> > /etc/hostname
|
|
```
|
|
|
|
Adding the `uuid` of the root partition to `crypttab`, by first creating `/etc/crypttab`:
|
|
|
|
```
|
|
# touch /etc/crypttab
|
|
```
|
|
|
|
Then the `uuid` can be obtained by:
|
|
|
|
```
|
|
# lsblk -f |grep luks >> /etc/crypttab
|
|
```
|
|
|
|
Now edit `/etc/crypttab` and insert:
|
|
|
|
```
|
|
root /dev/disk/by-uuid/<uuid> none:
|
|
```
|
|
|
|
We can configure the `fstab` by editing `/etc/fstab` and inserting:
|
|
|
|
```
|
|
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
|
|
efivarfs /sys/firmware/efi/efivars efivarfs defaults 0 0
|
|
/dev/disk/by-label/root / ext4 defaults,noatime 0 1
|
|
/dev/disk/by-label/efi /boot vfat defaults 0 2
|
|
```
|
|
|
|
Create `/etc/dracut.conf.d/30.conf` to configure dracut.
|
|
|
|
```
|
|
hostonly="yes"
|
|
use_fstab="yes"
|
|
install_items+=" /etc/crypttab "
|
|
add_drivers+=" vfat nls_cp437 nls_iso8859_1 "
|
|
```
|
|
|
|
Create a symbolic link from `/etc/fstab.sys` to `/etc/fstab` to indicate that dracut should mount all the file systems listed.
|
|
|
|
```
|
|
# ln -s /etc/fstab /etc/fstab.sys
|
|
```
|
|
|
|
Then, to omit mounting them again in runit stage 1, disable the corresponding core service.
|
|
|
|
```
|
|
# mv /etc/runit/core-services/03-filesystems.sh{,.bak}
|
|
```
|
|
|
|
Edit `/etc/xbps.d/xbps.conf` to prevent the service from being added back by an update to runit-void.
|
|
|
|
```
|
|
noextract=/etc/runit/core-services/03-filesystems.sh
|
|
```
|
|
|
|
Now mount `efivarfs` to `/sys/firmware/efi/efivars`.
|
|
|
|
```
|
|
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
|
|
```
|
|
|
|
And install gummiboot.
|
|
|
|
```
|
|
# gummiboot install
|
|
```
|
|
|
|
Create `/boot/loader/void-options.conf` to configure gummiboot.
|
|
|
|
```
|
|
# touch /boot/loader/void-options.conf
|
|
```
|
|
|
|
The `uuid` is needed again and can be obtained by:
|
|
|
|
```
|
|
# lsblk -f |grep luks >> /boot/loader/void-options.conf
|
|
```
|
|
|
|
Now edit `/boot/loader/void-options.conf` and insert:
|
|
|
|
```
|
|
rw rd.luks.name=<uuid>=root root=/dev/mapper/root quiet splash apparmor=1 security=apparmor loglevel=1
|
|
```
|
|
|
|
To obtain a boot menu. A timeout may be added to `/boot/loader/loader.conf`.
|
|
|
|
```
|
|
timeout 4
|
|
```
|
|
|
|
If running `glibc` the locales have to be configured, to configure the locales edit `/etc/default/libc-locales` and uncomment.
|
|
|
|
```
|
|
en_US.UTF-8 UTF-8
|
|
```
|
|
|
|
And reconfigure the locales.
|
|
|
|
```
|
|
# xbps-reconfigure -f glibc-locales
|
|
```
|
|
|
|
|
|
To obtain better security, `apparmor` will be set to enforce. By editing `/etc/default/apparmor` and inserting:
|
|
|
|
```
|
|
APPARMOR=enforce
|
|
```
|
|
|
|
To set the internal network edit `/etc/hosts` and insert.
|
|
|
|
```
|
|
127.0.1.1 <hostname>
|
|
```
|
|
|
|
Finally reconfigure Linux.
|
|
|
|
```
|
|
# xbps-reconfigure -f linux<version>
|
|
```
|
|
|
|
Exit the chroot.
|
|
|
|
```
|
|
# exit
|
|
```
|
|
|
|
Do not forget to umount. (I always do).
|
|
|
|
```
|
|
# umount -Rf /mnt
|
|
```
|
|
|
|
And reboot.
|
|
|
|
```
|
|
# shutdown -r now
|
|
```
|
|
|
|
## Post install
|
|
|
|
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.
|
|
|
|
```
|
|
$ git clone https://git.bijl.us/luc/void-desktop.git
|
|
```
|
|
|
|
### Network
|
|
|
|
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>
|
|
```
|
|
|
|
Configure a password for the user:
|
|
|
|
```
|
|
# passwd <user>
|
|
```
|
|
|
|
The user may be added to certain groups, to give it some rights.
|
|
|
|
```
|
|
# usermod -aG wheel,audio,video,kvm,tty,input,storage(,bluetooth,_seatd) <user>
|
|
```
|
|
|
|
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.
|
|
|
|
```
|
|
$ cp void-desktop/config-files/bash/.bashrc .bashrc
|
|
$ cp void-desktop/config-files/bash/.bash_profile .bash_profile
|
|
```
|
|
|
|
### Linux-lts
|
|
|
|
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 edit the `/etc/rc.conf` file.
|
|
|
|
```
|
|
HARDWARECLOCK="localtime"
|
|
```
|
|
|
|
And symlink the correct timezone to `/etc/localtime`:
|
|
|
|
```
|
|
# ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
|
|
```
|
|
|
|
### 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.
|
|
|
|
To create a swapfile of 8 GB use:
|
|
|
|
```
|
|
# dd if=/dev/zero of=/swapfile bs=8M count=1024 status=progress
|
|
```
|
|
|
|
To create a different size of swapfile, change the `count=` amount to a desirable size.
|
|
|
|
Then to actually add the swap space to your system issue these commands:
|
|
|
|
```
|
|
# chmod 600 /swapfile
|
|
# mkswap /swapfile
|
|
# swapon /swapfile
|
|
```
|
|
|
|
To mount the swap to the system at boot, add the swapfile to your `/etc/fstab`:
|
|
|
|
```
|
|
/swapfile none swap defaults 0 0
|
|
```
|
|
|
|
And do not forget to reconfigure the kernel after updating`/etc/fstab`:
|
|
|
|
```
|
|
# xbps-reconfigure -f linux<version>
|
|
```
|
|
|
|
### Network filesystems
|
|
|
|
Network filesystems may be used for enhanced workflow between multiple devices and persistance of storage.
|
|
|
|
#### Samba
|
|
|
|
Samba is such a Network filesystem protocol that may be used between different platforms. To use it install.
|
|
|
|
```
|
|
# xbps-install -Sy cifs-utils
|
|
```
|
|
|
|
Next, a credentials file will be created that is, `$HOME/.smbpasswd`. Edit the file and insert:
|
|
|
|
```
|
|
username=<username>
|
|
password=<password>
|
|
domain=<domain>
|
|
```
|
|
|
|
Concerning security considerations, the permissions may be enhanced.
|
|
|
|
```
|
|
# chmod 600 $HOME/.smbpasswd
|
|
```
|
|
|
|
Then edit `/etc/fstab` and insert:
|
|
|
|
```
|
|
//<domain>/<homefolder> $HOME/<smbfolder> cifs credentials=$HOME/.smbpasswd,_netdev,uid=<uid> 0 0
|
|
```
|
|
|
|
Finally mount the network filesystem.
|
|
|
|
```
|
|
# mount -a
|
|
```
|
|
|
|
### Logging
|
|
|
|
Logging may be benificial to spot certain misbehaviours or errors in the system. The `socklog-void` package will be used as logging daemon.
|
|
|
|
```
|
|
# xbps-install -Sy socklog-void
|
|
# ln -s /etc/sv/socklog-unix /var/service/
|
|
# ln -s /etc/sv/nanoklogd /var/service/
|
|
```
|
|
|
|
To read the logs use:
|
|
|
|
```
|
|
# svlogtail
|
|
```
|
|
|
|
Or go to `/var/log/socklog`.
|
|
|
|
### Repositories
|
|
|
|
To install the official Void Linux 32-bit and nonfree repositories simply install their respective packages:
|
|
|
|
* For glibc
|
|
|
|
```
|
|
# xbps-install -Sy void-repo-multilib void-repo-nonfree void-repo-multilib-nonfree
|
|
```
|
|
|
|
* For musl
|
|
|
|
```
|
|
# xbps-install -Sy void-repo-nonfree
|
|
```
|
|
|
|
And update the repositories:
|
|
|
|
```
|
|
# xbps-install -S
|
|
```
|
|
|
|
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`,
|
|
|
|
* For glibc:
|
|
|
|
```
|
|
repository=https://git.bijl.us/lnco/xbps-ample/raw/branch/main/current
|
|
repository=https://git.bijl.us/lnco/xbps-ample/raw/branch/main/current/nonfree
|
|
```
|
|
|
|
* For musl
|
|
|
|
```
|
|
repository=https://git.bijl.us/lnco/xbps-ample/raw/branch/main/current/musl
|
|
```
|
|
|
|
And refresh the repositories:
|
|
|
|
```
|
|
# xbps-install -S
|
|
```
|
|
|
|
### Firmware and drivers
|
|
|
|
#### GPU drivers
|
|
|
|
It is necessary for a graphical enviroment to install GPU drivers. To install the drivers for your GPU use one of the following commands:
|
|
|
|
* For Intel
|
|
|
|
```
|
|
# xbps-install -Sy linux-firmware-intel mesa mesa-dri vulkan-loader mesa-vulkan-intel intel-video-accel
|
|
```
|
|
|
|
* For AMD
|
|
|
|
```
|
|
# xbps-install -Sy linux-firmware-amd vulkan-loader mesa-vulkan-radeon amdvlk xf86-video-amdgpu mesa-vaapi mesa-vdpau mesa-dri
|
|
```
|
|
|
|
* For Nvidia (*glibc only*)
|
|
|
|
```
|
|
# xbps-install -Sy nvidia nvidia-opencl
|
|
```
|
|
|
|
##### 32-bit drivers
|
|
|
|
(Only applicable to glibc as Void Linux musl only supports 64-bit)
|
|
|
|
To run 32-bit applications like some videogames it will also be necessary to install the 32-bit drivers:
|
|
|
|
* For Intel
|
|
|
|
```
|
|
# xbps-install -Sy mesa-32bit mesa-dri-32bit mesa-vulkan-intel-32bit vulkan-loader-32bit
|
|
```
|
|
|
|
* For AMD
|
|
|
|
```
|
|
# xbps-install -Sy vulkan-loader-32bit amdvlk-32bit mesa-32bit mesa-dri-32bit
|
|
```
|
|
|
|
* For Nvidia
|
|
|
|
```
|
|
# xbps-install -Sy nvidia-libs-32bit
|
|
```
|
|
|
|
#### CPU firmware
|
|
|
|
To keep the firmware of your CPU up to date it is necessary to install the correct microcode:
|
|
|
|
* For Intel
|
|
|
|
(The Intel microcode requires that you are using the nonfree repository)
|
|
|
|
```
|
|
# xbps-install -Sy intel-ucode
|
|
```
|
|
|
|
And regenerate the initramfs:
|
|
|
|
```
|
|
# xbps-reconfigure -f linux<version>
|
|
```
|
|
|
|
|
|
|
|
* For AMD
|
|
|
|
```
|
|
# xbps-install -Sy linux-firmware-amd
|
|
```
|
|
|
|
### Secure-boot
|
|
|
|
Secure boot is sometimes a necessity when working with a windows dual boot on laptops.
|
|
|
|
#### Linux Windows dual boot
|
|
|
|
To obtain secure boot for a device with both linux and windows partitions (dual boot), the `sbctl` package will be used. It may be installed with.
|
|
|
|
```
|
|
# xbps-install -Sy sbctl
|
|
```
|
|
|
|
Then to create keys, enroll them and sign the executables with it.
|
|
|
|
```
|
|
# sbctl create-keys
|
|
# sbctl enroll-keys --microsoft
|
|
# sbctl sign -s /boot/EFI/Boot/BOOTX64.EFI
|
|
# sbctl sign -s /boot/EFI/gummiboot/gummibootx64.efi
|
|
# sbctl sign -s /boot/vmlinuz-<version>
|
|
```
|
|
|
|
Then to check if it worked.
|
|
|
|
```
|
|
# sbctl verify
|
|
```
|
|
|
|
After every linux kernel update the new executables should be signed.
|
|
|
|
### Laptop-management
|
|
|
|
To obtain enhanced battery lifespan, `tlp` and `tlpui` may be installed. The `tlpui` application may be used to monitor the general configuration of `tlp`.
|
|
|
|
```
|
|
# xbps-install -Sy tlp tlpui
|
|
```
|
|
|
|
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.
|
|
|
|
```
|
|
# ln -s /etc/sv/tlp /var/service
|
|
# ln -s /etc/sv/acpid /var/service
|
|
```
|
|
|
|
### Bluetooth
|
|
|
|
Bluetooth functionality may be obtained by enabling `bluetoothd`. Its packages may be installed by:
|
|
|
|
```
|
|
# xbps-install bluez bluez-alsa libspa-bluetooth
|
|
```
|
|
|
|
Then, `bluetoothd` may be enabled by symlinking it to `/var/service/`.
|
|
|
|
```
|
|
# ln -s /etc/sv/bluetoothd /var/service/
|
|
```
|
|
|
|
If it is the case that bluetooth is not constantly used. It may be generally disabled by:
|
|
|
|
```
|
|
# touch /var/service/bluetoothd/down
|
|
```
|
|
|
|
To be able to use bluetooth the user needs to be in the bluetooth group.
|
|
|
|
```
|
|
# usermod -aG bluetooth <user>
|
|
```
|
|
|
|
## Graphical session
|
|
|
|
### Session manager
|
|
|
|
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:
|
|
|
|
```
|
|
# xbps-install -Sy seatd turnstile polkit
|
|
```
|
|
|
|
Then to enable them:
|
|
|
|
```
|
|
# ln -s /etc/sv/seatd /var/service
|
|
# ln -s /etc/sv/turnstiled /var/service
|
|
```
|
|
|
|
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.
|
|
|
|
```
|
|
# cp -r void-desktop/config-files/wayfire/wayfire-greetd /usr/local/bin/
|
|
```
|
|
|
|
Also, a wayfire config may be created specific for greetd with minimal settings.
|
|
|
|
```
|
|
# cp -r void-desktop/config-files/wayfire/wayfire-greetd.ini /etc/greetd/config/
|
|
```
|
|
|
|
Then, in `/etc/greetd/config.toml` set:
|
|
|
|
```
|
|
command = "wayfire-greetd -c /etc/greetd/config/wayfire-greetd.ini"
|
|
```
|
|
|
|
The user `_greeter` needs seatd permission for wayfire to function.
|
|
|
|
```
|
|
# usermod -aG _seatd _greeter
|
|
```
|
|
|
|
For styling of gtkgreet edit `/etc/greetd/config/gtkgreet.css`:
|
|
|
|
```
|
|
# cp -r void-desktop/config-files/gtkgreet/gtkgreet.css /etc/greetd/config/
|
|
```
|
|
|
|
Finally add `wayfire-run` and possibly `bash` to `/etc/greetd/environments`.
|
|
|
|
```
|
|
wayfire-run
|
|
bash
|
|
```
|
|
|
|
Additionally `kanshi` and `wlogout` may be added in the greeter session.
|
|
|
|
```
|
|
# cp -r void-desktop/config-files/kanshi /etc/greetd/config/
|
|
# cp -r void-desktop/config-files/wlogout /etc/greetd/config/
|
|
```
|
|
|
|
### Window manager
|
|
|
|
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:
|
|
|
|
```
|
|
# xbps-install -Sy wf-shell wcm dconf-editor plata-theme papirus-icon-theme
|
|
```
|
|
|
|
Wayfire can be configured by editing `.config/wayfire.ini`.
|
|
|
|
```
|
|
$ cp void-desktop/config-files/wayfire/wayfire.ini .config/
|
|
```
|
|
|
|
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.
|
|
|
|
```
|
|
# cp -r void-desktop/config-files/wayfire/wayfire-run /usr/local/bin/
|
|
```
|
|
|
|
<!---
|
|
#### Plugin configuration
|
|
|
|
##### Input
|
|
|
|
##### Background
|
|
|
|
##### Follow focus
|
|
|
|
##### Animate
|
|
|
|
##### Blur
|
|
--->
|
|
|
|
### Display configuration
|
|
|
|
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:
|
|
|
|
```
|
|
# xbps-install -Sy kanshi wdisplays wlr-randr
|
|
```
|
|
|
|
To actually change the display settings edit the `.config/kanshi/config` according to it's manpage. It should look something like:
|
|
|
|
```
|
|
profile <profile_name> {
|
|
output "<display_1>" mode<horizontal_resolution>x<vertical_resolution>@<display_frequency> position <x_coordinate>,<y_coordinate>
|
|
output "<display_2>" mode<horizontal_resolution>x<vertical_resolution>@<display_frequency> position <x_coordinate>,<y_coordinate>
|
|
}
|
|
```
|
|
|
|
And make sure `kanshi` gets started by Wayfire by adding it to auto start.
|
|
|
|
```
|
|
[autostart]
|
|
outputs = kanshi
|
|
```
|
|
|
|
#### Color-temperature adjustment
|
|
|
|
For changing the day/night gamma install `wlsunset`.
|
|
|
|
```
|
|
# xbps-install -Sy wlsunset
|
|
```
|
|
|
|
Add it to Wayfire by auto starting it through:
|
|
|
|
```
|
|
[autostart]
|
|
gamma = wlsunset -l <latitude> -L <longitude> -t <color-temperature>
|
|
```
|
|
|
|
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.
|
|
|
|
```
|
|
# xbps-install -Sy Waybar network-manager-applet fonts-roboto-ttf font-awesome
|
|
```
|
|
|
|
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`.
|
|
|
|
```
|
|
[command]
|
|
binding_launcher = <super> KEY_S
|
|
command_launcher = tofi-drun | xargs /bin/bash -c -- & exit
|
|
```
|
|
|
|
#### Wofi
|
|
|
|
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`.
|
|
|
|
```
|
|
$ cp -r void-desktop/config-files/wlogout .config/
|
|
# cp void-desktop/data/wlogout-icons/* /usr/share/wlogout/icons/
|
|
```
|
|
|
|
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.
|
|
|
|
```
|
|
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;
|
|
});
|
|
```
|
|
|
|
or
|
|
|
|
```
|
|
# cp void-desktop/config-files/polkit/00-power-management.rules /etc/polkit-1/rules.d/
|
|
```
|
|
|
|
### Notifications
|
|
|
|
#### SwayNC
|
|
|
|
For a more robust notification deamon it's recommended to use SwayNotificationCenter which also provides a *notifications center* which can be heavily customised.
|
|
|
|
To install SwayNC:
|
|
|
|
```
|
|
# xbps-install -Sy swaync
|
|
```
|
|
|
|
#### Mako
|
|
|
|
For a very minimal notification deamon it's recommended to use Mako. It can be used to display notifications from the session-bus.
|
|
|
|
To install it.
|
|
|
|
```
|
|
# xbps-install -Sy mako
|
|
```
|
|
|
|
Mako may be configured by editing `.config/mako/config`.
|
|
|
|
```
|
|
$ cp -r void-desktop/config-files/mako .config/
|
|
```
|
|
|
|
Mako needs to be started by Wayfire.
|
|
|
|
```
|
|
[autostart]
|
|
notifications = mako
|
|
```
|
|
|
|
### Audio
|
|
|
|
To obtain audio the `pipewire` server will be used with an `alsa-pipewire` plugin in combination with `wireplumber` as session manager.
|
|
|
|
They may be installed with:
|
|
|
|
```
|
|
# xbps-install -Sy alsa-pipewire pipewire wireplumber
|
|
```
|
|
|
|
Subsequently copy `/usr/share/pipewire/pipewire.conf` to `/etc/pipewire/`.
|
|
|
|
```
|
|
# cp /usr/share/pipewire/pipewire.conf /etc/pipewire/
|
|
```
|
|
|
|
`/etc/pipewire/pipewire.conf` may be configured by inserting:
|
|
|
|
```
|
|
context.exec = [
|
|
{ path = "/usr/bin/wireplumber" args = "" }
|
|
{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf"}
|
|
]
|
|
```
|
|
|
|
Then `/etc/alsa/conf.d` may be created and pipewire configurations may be symlinked:
|
|
|
|
```
|
|
# ln -s /usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/
|
|
# ln -s /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/
|
|
```
|
|
|
|
Pipewire needs to be started by Wayfire.
|
|
|
|
```
|
|
[autostart]
|
|
audio = pipewire
|
|
```
|
|
|
|
#### Audio control
|
|
|
|
To obtain some control over the audio `pavucontrol`, `pamixer` and `pa-notify` may be installed.
|
|
|
|
```
|
|
# xbps-install -Sy pavucontrol pamixer pa-notify
|
|
```
|
|
|
|
Volume control bindings may be set with `pamixer` in `.config/wayfire.ini`.
|
|
|
|
```
|
|
[command]
|
|
binding_volumeup = KEY_VOLUMEUP
|
|
binding_volumedown = KEY_VOLUMEDOWN
|
|
binding_mute = KEY_MUTE
|
|
command_volumeup = pamixer -i 5 -u
|
|
command_volumedown = pamixer -d 5 -u
|
|
command_mute = pamixer -t
|
|
```
|
|
|
|
To be notified when changing the volume `pa-notify` may be used. It needs to be started by Wayfire.
|
|
|
|
```
|
|
[autostart]
|
|
audio_notify = sleep 5; pa-notify -t 2
|
|
```
|
|
|
|
#### Music control
|
|
|
|
To control music and other media `playerctl` may be used.
|
|
|
|
```
|
|
# xbps-install -Sy playerctl
|
|
```
|
|
|
|
The bindings may be set in `.config/wayfire.ini`.
|
|
|
|
```
|
|
binding_playpause = KEY_PLAYPAUSE
|
|
binding_next = KEY_NEXTSONG
|
|
binding_previous = KEY_PREVIOUSSONG
|
|
command_playpause = playerctl play-pause
|
|
command_next = playerctl next
|
|
command_previous = playerctl previous
|
|
```
|
|
|
|
### Screenshots
|
|
|
|
To be able to make screenshots on the system the packages `grim`, `slurp` and `wl-clipboard` will need to be installed.
|
|
|
|
```
|
|
# xbps-install -Sy grim slurp wl-clipboard
|
|
```
|
|
|
|
And bind them in `.config/wayfire.ini`.
|
|
|
|
```
|
|
[command]
|
|
binding_screenshot = KEY_SYSRQ
|
|
binding_screenshot_interactive = <ctrl> <super> KEY_S
|
|
command_screenshot = grim - | wl-copy -t image/png
|
|
command_screenshot_interactive = pkill -9 slurp ; grim -g "$(slurp -d)" - | wl-copy -t image/png
|
|
```
|
|
|
|
Now the *Prt Scn* key will make a screenshot of the entire desktop and *ctrl + super + S* will let you select a region to screenshot.
|
|
|
|
### Idle and lockscreen
|
|
|
|
Wayfire has a screensaver and dpms option. These may be configured by editing `.config/wayfire.ini`.
|
|
|
|
```
|
|
[idle]
|
|
screensaver_timeout = <timeout_screensaver>
|
|
dpms_timeout = <timeout_dpms>
|
|
```
|
|
|
|
Logically, `timeout_dpms` > `timeout_screensaver`.
|
|
|
|
`gtklock` is used as lockscreen, since it nicely matches the `gtkgreet` login manager.
|
|
|
|
```
|
|
# xbps-install -Sy gtklock
|
|
```
|
|
|
|
`gtklock` can be configured with the same `css` file as `gtkgreet`. Thereby:
|
|
|
|
```
|
|
# ln -s /etc/greetd/config/gtkgreet.css .config/gtklock/style.css
|
|
```
|
|
|
|
To initiate `gtklock` before sleep and after a certain time, `swayidle` may be used.
|
|
|
|
```
|
|
# xbps-install -Sy swayidle
|
|
```
|
|
|
|
Then, in `.config/wayfire.ini` gtklock may be started with the given conditions:
|
|
|
|
```
|
|
[autostart]
|
|
idle = swayidle -w timeout 590 gtklock before-sleep gtklock
|
|
```
|
|
|
|
### Auto-mounting
|
|
|
|
`udiskie` will be used to automatically mount drives. It may be installed with.
|
|
|
|
```
|
|
# xpbs-install -Sy udiskie
|
|
```
|
|
|
|
`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:
|
|
|
|
```
|
|
polkit.addRule(function(action, subject)
|
|
{
|
|
if (action.id.startsWith("org.freedesktop.udisks2.") && subject.isInGroup("storage"))
|
|
return polkit.Result.YES;
|
|
});
|
|
```
|
|
|
|
or
|
|
|
|
```
|
|
# cp void-desktop/config-files/polkit/00-mounting.rules /etc/polkit-1/rules.d/
|
|
```
|
|
|
|
### Essential applications
|
|
|
|
Some essential applications and packages.
|
|
|
|
```
|
|
# xbps-install firefox-esr vscode foot Thunar element-desktop mpv blueman noto-fonts-ttf noto-fonts-cjk
|
|
```
|
|
<!---
|
|
## Misc
|
|
|
|
### Printing
|
|
|
|
### Virt-manager
|
|
|
|
### Wine
|
|
|
|
### Steam
|
|
---> |