{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Welcome to wiki.bijl.us","text":"

These are all the docs related to git.bijl.us.

The only one currently available for reading here is the Void Linux Desktop install and the Xbps-Ample wiki.

"},{"location":"void-desktop-setup/Application-launcher/","title":"Application launcher","text":"

An application launcher may be used to easily start applications in Wayfire.

"},{"location":"void-desktop-setup/Application-launcher/#tofi","title":"Tofi","text":"

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\n

Tofi can be configured by editing .config/tofi/config.

cp -r {config-files-repo}/tofi .config/\n

To launch tofi through a keybind it has to be bound in .config/wayfire.ini.

[command]\nbinding_launcher = <super> KEY_S\ncommand_launcher = tofi-drun | xargs /bin/bash -c -- & exit\n
"},{"location":"void-desktop-setup/Application-launcher/#wofi","title":"Wofi","text":"

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\n

Wofi may be configured by editing .config/wofi/config.

$ cp -r {config-files-repo}/wofi .config/\n

Wofi may be launched with a keybind, thereby edit .config/wayfire.ini.

[command]\nbinding_launcher = <super> KEY_S\ncommand_launcher = wofi --show drun\n
"},{"location":"void-desktop-setup/Application-launcher/#wlogout","title":"Wlogout","text":"

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\n

Wlogout can be configured by editing .config/wlogout/layout.

$ cp -r {config-files-repo}/wlogout .config/\n# cp {config-files-repo}/extra/wlogout-icons/* /usr/share/wlogout/icons/\n

Wlogout can be launched with a keybind, thereby edit .config/wayfire.ini.

[command]\nbinding_wlogout = <super> KEY_P\ncommand_wlogout = wlogout\n

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) \n{\n    if (action.id == \"org.freedesktop.policykit.exec\" && action.lookup(\"program\") == \"/bin/shutdown\" && subject.isInGroup(\"wheel\"))\n        return polkit.Result.YES;\n});\n\npolkit.addRule(function(action, subject)\n{\n    if (action.id == \"org.freedesktop.policykit.exec\" && action.lookup(\"program\") == \"/bin/zzz\" && subject.isInGroup(\"wheel\"))\n        return polkit.Result.YES;\n});\n

or

# cp {config-files-repo}/polkit/00-power-management.rules /etc/polkit-1/rules.d/\n
"},{"location":"void-desktop-setup/Audio/","title":"Audio","text":"

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\n

Subsequently copy /usr/share/pipewire/pipewire.conf to /etc/pipewire/.

# cp /usr/share/pipewire/pipewire.conf /etc/pipewire/\n

/etc/pipewire/pipewire.conf may be configured by inserting:

context.exec = [\n    { path = \"/usr/bin/wireplumber\" args = \"\" }\n    { path = \"/usr/bin/pipewire\" args = \"-c pipewire-pulse.conf\"}\n]\n

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/\n# ln -s /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/\n

Pipewire needs to be started by Wayfire.

[autostart]\naudio = pipewire\n
"},{"location":"void-desktop-setup/Audio/#audio-control","title":"Audio control","text":"

To obtain some control over the audio pavucontrol, pamixer and pa-notify may be installed.

# xbps-install -Sy pavucontrol pamixer pa-notify\n

Volume control bindings may be set with pamixer in .config/wayfire.ini.

[command]\nbinding_volumeup = KEY_VOLUMEUP\nbinding_volumedown = KEY_VOLUMEDOWN \nbinding_mute = KEY_MUTE\ncommand_volumeup = pamixer -i 5 -u\ncommand_volumedown = pamixer -d 5 -u\ncommand_mute = pamixer -t\n

To be notified when changing the volume pa-notify may be used. It needs to be started by Wayfire.

[autostart]\naudio_notify = sleep 1; pa-notify -t 2\n
"},{"location":"void-desktop-setup/Audio/#music-control","title":"Music control","text":"

To control music and other media playerctl may be used.

# xbps-install -Sy playerctl\n

The bindings may be set in .config/wayfire.ini.

[autostart]\naudio_player = playerctld daemon\n\n[command]\nbinding_playpause = KEY_PLAYPAUSE\nbinding_next = KEY_NEXTSONG\nbinding_previous = KEY_PREVIOUSSONG\ncommand_playpause = playerctl play-pause\ncommand_next = playerctl next\ncommand_previous = playerctl previous\n
"},{"location":"void-desktop-setup/Auto-mounting/","title":"Auto-mounting","text":"

udiskie will be used to automatically mount drives. It may be installed with.

# xpbs-install -Sy udiskie\n

udiskie needs to be started in Wayfire. This can be obtained by editing .config/wayfire.ini.

[autostart]\nautomount = udiskie -As\n

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)\n{\n    if (action.id.startsWith(\"org.freedesktop.udisks2.\") && subject.isInGroup(\"storage\"))\n        return polkit.Result.YES;\n});\n

or

# cp {config-files-repo}/polkit/00-mounting.rules /etc/polkit-1/rules.d/\n
"},{"location":"void-desktop-setup/Automatic-decryption/","title":"Automatic decryption","text":"

(unfinished)

Using Clevis it's possible to automatically decrypt the system upon startup. But because we haven't been able to figure out how to create a functional template file for that we'll have to compile it ourselves. Note that you must use the booster initramfs. (A lot more information about the possibilities from clevis can be found on the ArchWiki)

"},{"location":"void-desktop-setup/Automatic-decryption/#installing-jose","title":"Installing Jos\u00e9","text":"

First we have to compile Jos\u00e9, a \"C-language implementation of Javascript Object Signing and Encryption\". Jos\u00e9 is a dependency of Clevis. First install the dependencies needed to compile jos\u00e9.

# xbps-install -Sy pkg-config zlib-devel jansson-devel openssl-devel jq-devel gcc meson ninja asciidoc\n

After that we have to obtain the source of Jos\u00e9:

$ xbps-fetch https://github.com/latchset/jose/archive/refs/tags/v11.tar.gz\n

Unpack the Tar and go into the directory and follow the rest of these instructions:

$ mkdir build && cd build\n$ meson .. --prefix=/usr\n$ ninja\n# ninja install\n
"},{"location":"void-desktop-setup/Automatic-decryption/#installing-clevis","title":"Installing Clevis","text":"

After having installed Jos\u00e9 install the other dependencies.

# xbps-install -Sy luksmeta cryptsetup-devel tpm2-tools libpwquality-devel\n(probably missing a few)\n

Then clone the source code into a directory

$ xbps-fetch https://github.com/latchset/clevis/archive/refs/tags/v19.tar.gz\n

After unpacking and going into the directory follow the rest of these instructions:

$ meson build\n$ ninja -C build\n# ninja -C build install\n
"},{"location":"void-desktop-setup/Automatic-decryption/#acquiring-automatic-decryption","title":"Acquiring automatic decryption","text":"

To bind our LUKS volume to TPM with clevis simply enter this command:

# clevis luks bind -d /dev/disk/by-label/luks tpm2 '{\"pcr_bank\":\"sha256\",\"pcr_ids\":\"1,7\"}'\n# xbps-reconfigure -f linux<version>\n

This will bind the partition with TPM2 and Secureboot and now the root partition can be unencrypted on startup automatically.

"},{"location":"void-desktop-setup/Bluetooth/","title":"Bluetooth","text":"

Bluetooth functionality may be obtained by enabling bluetoothd. Its packages may be installed by:

# xbps-install bluez bluez-alsa libspa-bluetooth\n

Then, bluetoothd may be enabled by symlinking it to /var/service/.

# ln -s /etc/sv/bluetoothd /var/service/\n

If it is the case that bluetooth is not constantly used. It may be generally disabled by:

# touch /var/service/bluetoothd/down\n

To be able to use bluetooth the user needs to be in the bluetooth group.

# usermod -aG bluetooth <user>\n
"},{"location":"void-desktop-setup/Display-configuration/","title":"Display configuration","text":"

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:

# xbps-install -Sy kanshi\n

To actually change the display settings edit the .config/kanshi/config according to it's manpage. It should look something like:

profile <profile_name> {\n    output \"<display_1>\" mode<horizontal_resolution>x<vertical_resolution>@<display_frequency> position <x_coordinate>,<y_coordinate>\n    output \"<display_2>\" mode<horizontal_resolution>x<vertical_resolution>@<display_frequency> position <x_coordinate>,<y_coordinate>\n}\n

And make sure kanshi gets started by Wayfire by adding it to auto start.

[autostart]\noutputs = kanshi\n
"},{"location":"void-desktop-setup/Display-configuration/#color-temperature-adjustment","title":"Color-temperature adjustment","text":"

For changing the day/night gamma install wlsunset.

# xbps-install -Sy wlsunset\n

Add it to Wayfire by auto starting it through:

[autostart]\ngamma = wlsunset -l <latitude> -L <longitude> -t <color-temperature>\n

Change the latitude, longitude and color-temperature according to your location and preference.

"},{"location":"void-desktop-setup/Essential-applications/","title":"Essential applications","text":"

Some essential applications and packages.

# xbps-install firefox-esr vscode foot Thunar element-desktop htop mpv blueman wdisplays wlr-randr noto-fonts-ttf noto-fonts-cjk\n
"},{"location":"void-desktop-setup/Firmware-and-drivers/","title":"Firmware and drivers","text":""},{"location":"void-desktop-setup/Firmware-and-drivers/#gpu-drivers","title":"GPU drivers","text":"

It is necessary for a graphical enviroment to install GPU drivers. To install the drivers for your GPU use one of the following commands:

"},{"location":"void-desktop-setup/Firmware-and-drivers/#for-intel","title":"For Intel","text":"
# xbps-install -Sy linux-firmware-intel mesa mesa-dri vulkan-loader mesa-vulkan-intel intel-video-accel \n
"},{"location":"void-desktop-setup/Firmware-and-drivers/#for-amd","title":"For AMD","text":"
# xbps-install -Sy linux-firmware-amd vulkan-loader mesa-vulkan-radeon amdvlk xf86-video-amdgpu mesa-vaapi mesa-vdpau mesa-dri\n
"},{"location":"void-desktop-setup/Firmware-and-drivers/#for-nvidia-glibc-only","title":"For Nvidia (glibc only)","text":"
# xbps-install -Sy nvidia nvidia-opencl\n
"},{"location":"void-desktop-setup/Firmware-and-drivers/#32-bit-drivers","title":"32-bit drivers","text":"

(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:

"},{"location":"void-desktop-setup/Firmware-and-drivers/#for-intel_1","title":"For Intel","text":"
# xbps-install -Sy mesa-32bit mesa-dri-32bit mesa-vulkan-intel-32bit vulkan-loader-32bit\n
"},{"location":"void-desktop-setup/Firmware-and-drivers/#for-amd_1","title":"For AMD","text":"
# xbps-install -Sy vulkan-loader-32bit amdvlk-32bit mesa-32bit mesa-dri-32bit\n
"},{"location":"void-desktop-setup/Firmware-and-drivers/#for-nvidia","title":"For Nvidia","text":"
# xbps-install -Sy nvidia-libs-32bit\n
"},{"location":"void-desktop-setup/Firmware-and-drivers/#cpu-firmware","title":"CPU firmware","text":"

To keep the firmware of your CPU up to date it is necessary to install the correct microcode:

"},{"location":"void-desktop-setup/Firmware-and-drivers/#for-intel_2","title":"For Intel","text":"

(The Intel microcode requires that you are using the nonfree repository)

# xbps-install -Sy intel-ucode\n

And regenerate the initramfs:

# xbps-reconfigure -f linux<version>\n
"},{"location":"void-desktop-setup/Firmware-and-drivers/#for-amd_2","title":"For AMD","text":"
# xbps-install -Sy linux-firmware-amd\n
"},{"location":"void-desktop-setup/Firmware-and-drivers/#nvidia-wayland","title":"Nvidia + Wayland","text":"

For Nvidia to work correctly with Wayfire you'll have to add the boot parameter to /boot/loader/void-options.conf.

nvidia-drm.modeset=1\n

And reconfigure the kernel:

# xbps-reconfigure -f linux<version>\n
"},{"location":"void-desktop-setup/Home/","title":"A Void Linux installation","text":"

This install is based on the EFI boot stub blog entry of Matthias Totschnig, the Void Handbook 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.

"},{"location":"void-desktop-setup/Idle-and-lockscreen/","title":"Idle and lockscreen","text":"

Wayfire has a screensaver and dpms option. These may be configured by editing .config/wayfire.ini.

[idle]\nscreensaver_timeout = <timeout_screensaver>\ndpms_timeout = <timeout_dpms>\n

Logically, timeout_dpms > timeout_screensaver.

gtklock is used as lockscreen, since it nicely matches the gtkgreet login manager.

# xbps-install -Sy gtklock\n

gtklock can be configured with the same css file as gtkgreet. Thereby:

# ln -s /etc/greetd/config/gtkgreet.css .config/gtklock/style.css\n

To initiate gtklock before sleep and after a certain time, swayidle may be used.

# xbps-install -Sy swayidle\n

Then, in .config/wayfire.ini gtklock may be started with the given conditions:

[autostart]\nidle = swayidle -w timeout 590 gtklock before-sleep gtklock\n
"},{"location":"void-desktop-setup/Installation-with-LVM/","title":"Installation","text":"

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/lv0-root /mnt\n# mkdir /mnt/boot\n# mount /dev/disk/by-label/efi /mnt/boot\n# for dir in dev proc sys run; do\n> mkdir /mnt/$dir\n> mount --rbind --make-rslave /$dir /mnt/$dir\n> done\n

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.

# xbps-install -Sy -R https://repo-default.voidlinux.org/current -r /mnt base-system cryptsetup gummiboot vim apparmor NetworkManager git lvm2 booster\n
# xbps-install -Sy -R https://repo-default.voidlinux.org/current/musl -r /mnt base-system cryptsetup gummiboot vim apparmor NetworkManager git lvm2 booster\n

To get internet inside the chroot whilst installing the system, copy over the resolv.conf.

# cp /etc/resolv.conf /mnt/etc/\n

Entering the chroot and configuring the system.

# chroot /mnt\n# chown root:root /\n# chmod 755 /\n# passwd root\n# echo <hostname> > /etc/hostname\n

Adding the uuid of the root partition to crypttab by:

# blkid -o value -s UUID /dev/<disk2> >> /etc/crypttab\n

Now edit /etc/crypttab and insert:

root /dev/disk/by-uuid/<uuid> none\n

We can configure the fstab by editing /etc/fstab and inserting:

tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0\nefivarfs /sys/firmware/efi/efivars efivarfs defaults 0 0\n/dev/disk/by-label/root / ext4 defaults,noatime 0 0\n/dev/disk/by-label/home /home ext4 defaults,noatime 0 0\n/dev/disk/by-label/efi /boot vfat defaults 0 2\n

Booster is a faster and more secure initramfs than Dracut.

To configure booster create a file /etc/booster.yaml which contains:

busybox: true\nmodules: vfat,nls_cp437,nls_iso8859_1\nenable_lvm: true\n

Then to remove dracut from the system first create a config file at /etc/xbps.d/no-dracut.conf

ignorepkg=dracut\n

And after that delete it from the system with:

# xbps-remove -Ry dracut\n

Now mount efivarfs to /sys/firmware/efi/efivars.

# mount -t efivarfs efivarfs /sys/firmware/efi/efivars\n

And install gummiboot.

# gummiboot install\n

Create /boot/loader/void-options.conf to configure gummiboot.

# touch /boot/loader/void-options.conf\n

The uuid is needed again and can be obtained by:

# blkid -o value -s UUID /dev/<disk2> >> /boot/loader/void-options.conf\n

Now edit /boot/loader/void-options.conf and insert:

rw rd.luks.name=<uuid>=root root=/dev/disk/by-label/root quiet splash apparmor=1 security=apparmor loglevel=1 rd.lvm.vg=lv0\n

To obtain a boot menu. A timeout may be added to /boot/loader/loader.conf.

timeout 4\n

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\n

And reconfigure the locales.

 # xbps-reconfigure -f glibc-locales\n

To obtain better security, apparmor will be set to enforce. By editing /etc/default/apparmor and inserting:

APPARMOR=enforce\n

To set the internal network edit /etc/hosts and insert.

127.0.1.1 <hostname>\n

Finally reconfigure the linux kernel.

# xbps-reconfigure -f linux<version>\n

Exit the chroot.

# exit\n

Do not forget to umount. (I always do).

# umount -Rf /mnt\n

And reboot.

# shutdown -r now\n
"},{"location":"void-desktop-setup/Installation/","title":"Installation","text":"

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\n# mkdir /mnt/boot\n# mount /dev/disk/by-label/efi /mnt/boot\n# for dir in dev proc sys run; do\n> mkdir /mnt/$dir\n> mount --rbind --make-rslave /$dir /mnt/$dir\n> done\n

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.

# xbps-install -Sy -R https://repo-default.voidlinux.org/current -r /mnt base-system cryptsetup gummiboot vim apparmor NetworkManager git booster\n
# xbps-install -Sy -R https://repo-default.voidlinux.org/current/musl -r /mnt base-system cryptsetup gummiboot vim apparmor NetworkManager git booster\n

To get internet inside the chroot whilst installing the system, copy over the resolv.conf.

# cp /etc/resolv.conf /mnt/etc/\n

Entering the chroot and configuring the system.

# chroot /mnt\n# chown root:root /\n# chmod 755 /\n# passwd root\n# echo <hostname> > /etc/hostname\n

Adding the uuid of the root partition to crypttab by:

# blkid -o value -s UUID /dev/<disk2> >> /etc/crypttab\n

Now edit /etc/crypttab and insert:

root /dev/disk/by-uuid/<uuid> none\n

We can configure the fstab by editing /etc/fstab and inserting:

tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0\nefivarfs /sys/firmware/efi/efivars efivarfs defaults 0 0\n/dev/disk/by-label/root / ext4 defaults,noatime 0 1\n/dev/disk/by-label/efi /boot vfat defaults 0 2\n

Booster is a faster and more secure initramfs than Dracut.

To configure booster create a file /etc/booster.yaml which contains:

busybox: true\nmodules: vfat,nls_cp437,nls_iso8859_1\n

Then to remove dracut from the system first create a config file at /etc/xbps.d/no-dracut.conf

ignorepkg=dracut\n

And after that delete it from the system with:

# xbps-remove -Ry dracut\n

Now mount efivarfs to /sys/firmware/efi/efivars.

# mount -t efivarfs efivarfs /sys/firmware/efi/efivars\n

And install gummiboot.

# gummiboot install\n

Create /boot/loader/void-options.conf to configure gummiboot.

# touch /boot/loader/void-options.conf\n

The uuid is needed again and can be obtained by:

# blkid -o value -s UUID /dev/<disk2> >> /boot/loader/void-options.conf\n

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\n

To obtain a boot menu. A timeout may be added to /boot/loader/loader.conf.

timeout 4\n

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\n

And reconfigure the locales.

 # xbps-reconfigure -f glibc-locales\n

To obtain better security, apparmor will be set to enforce. By editing /etc/default/apparmor and inserting:

APPARMOR=enforce\n

To set the internal network edit /etc/hosts and insert.

127.0.1.1 <hostname>\n

Finally reconfigure Linux.

# xbps-reconfigure -f linux<version>\n

Exit the chroot.

# exit\n

Do not forget to umount. (I always do).

# umount -Rf /mnt\n

And reboot.

# shutdown -r now\n
"},{"location":"void-desktop-setup/Laptop-management/","title":"Laptop management","text":"

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\n

Edit /etc/tlp.d/00-template.conf to set the battery usage to a more conservative setting.

CPU_ENERGY_PERF_POLICY_ON_AC=performance\nCPU_ENERGY_PERF_POLICY_ON_BAT=power\n

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\n# ln -s /etc/sv/acpid /var/service\n
"},{"location":"void-desktop-setup/Linux-lts/","title":"Linux-lts","text":"

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\n

To uninstall the non-lts kernel, ignore the package through /etc/xbps.d/xbps.conf by adding:

ignorepkg=linux\n

And then removing the linux meta package and its dependecies:

# xbps-remove -Ry linux\n

You should choose a kernel depending on the hardware of your computer. If the components are relatively new they might not work with an LTS kernel.

"},{"location":"void-desktop-setup/Localtime/","title":"Date and time","text":"

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\n

Then to active its service:

ln -s /etc/sv/chronyd /var/service\n

To configure the timezone edit the /etc/rc.conf file.

HARDWARECLOCK=\"localtime\"\n

And symlink the correct timezone to /etc/localtime:

# ln -sf /usr/share/zoneinfo/<Region>/<City> /etc/localtime\n
"},{"location":"void-desktop-setup/Logging/","title":"Logging","text":"

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\n# ln -s /etc/sv/socklog-unix /var/service/\n# ln -s /etc/sv/nanoklogd /var/service/\n

To read the logs use:

# svlogtail\n

Or go to /var/log/socklog.

"},{"location":"void-desktop-setup/Login-manager/","title":"Login manager","text":"

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\n

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 {config-files-repo}/wayfire/wayfire-greetd /usr/local/bin/\n

Also, a wayfire config may be created specific for greetd with minimal settings.

# mkdir /etc/greetd/config\n# cp -r {config-files-repo}/wayfire/wayfire-greetd.ini /etc/greetd/config/\n

Then, in /etc/greetd/config.toml set:

command = \"wayfire-greetd -c /etc/greetd/config/wayfire-greetd.ini\"\n

The user _greeter needs seatd permission for wayfire to function.

# usermod -aG _seatd _greeter\n

For styling of gtkgreet edit /etc/greetd/config/gtkgreet.css:

# cp -r {config-files-repo}/gtkgreet/gtkgreet.css /etc/greetd/config/\n

Finally add wayfire-run and possibly bash to /etc/greetd/environments.

wayfire-run\nbash\n

Additionally kanshi may be added in the greeter session. To obtain the right display configuration in the greeter session.

# cp -r {config-files-repo}/kanshi /etc/greetd/config\n

Greetd may then be enabled by linking it to /var/service. However, the best practice is to first test greetd. Since, with a non-functioning greetd, it may not be possible anymore to log into the system.

The best practice is thus to create a down file in the greetd service.

# touch /etc/sv/greetd/down\n

And then linking and enabling greetd.

# ln -s /etc/sv/greetd /var/service\n# sv up greetd\n

If greetd functions properly the down file may be removed.

"},{"location":"void-desktop-setup/Network-filesystems/","title":"Network filesystems","text":"

Network filesystems may be used for enhanced workflow between multiple devices and persistance of storage.

"},{"location":"void-desktop-setup/Network-filesystems/#samba","title":"Samba","text":"

Samba is such a Network filesystem protocol that may be used between different platforms. To use it install.

# xbps-install -Sy cifs-utils\n

Next, a credentials file will be created that is, $HOME/.smbpasswd. Edit the file and insert:

username=<username>\npassword=<password>\ndomain=<domain>\n

Concerning security considerations, the permissions may be enhanced.

# chmod 600 $HOME/.smbpasswd\n

Then edit /etc/fstab and insert:

//<domain>/<homefolder> $HOME/<smbfolder> cifs credentials=$HOME/.smbpasswd,_netdev,uid=<uid> 0 0\n

Finally mount the network filesystem.

# mount -a\n
"},{"location":"void-desktop-setup/Network/","title":"Network","text":"

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\n

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\n

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]\nwifi.scan-rand-mac-address=yes\n[connection-mac-randomization]\nethernet.cloned-mac-address=random\nwifi.cloned-mac-address=random\n

For the user to be able to modify connections on the system they'll have to be added to the network group.

# usermod -aG network <user>\n
"},{"location":"void-desktop-setup/Notifications/","title":"Notifications","text":""},{"location":"void-desktop-setup/Notifications/#swaync","title":"SwayNC","text":"

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 SwayNotificationCenter\n

SwayNC's functionality and looks can be edited through .config/swaync/config.json and .config/swaync/style.css .....

$ cp -r {config-files-repo}/swaync .config/\n

To use SwayNC make sure it gets started by Wayfire and to be able to toggle it's notification center also bind it in .config/wayfire.ini.

[autostart]\nnotifications = swaync\n\n[command]\nbinding_swaync = <super> KEY_TAB\ncommand_swaync = swaync-client -t -sw\n

Waybar can also be configured to display an icon for when there are unread notifications. In .config/waybar/config add:

        \"modules-right\": [\"bluetooth\",\"battery\",\"tray\",\"custom/notification\"],\n

And

    \"custom/notification\": {\n        \"tooltip\": false,\n        \"format\": \"{icon}\",\n    \"format-icons\": {\n        \"notification\": \"\u2b58<span foreground='red'><sup>\uf444</sup></span>\",\n        \"none\": \"\u2b58\",\n        \"dnd-notification\": \"\u2b58<span foreground='red'><sup>\uf444</sup></span>\",\n        \"dnd-none\": \"\u2b58\",\n        \"inhibited-notification\": \"\u2b58<span foreground='red'><sup>\uf444</sup></span>\",\n        \"inhibited-none\": \"\u2b58\",\n        \"dnd-inhibited-notification\": \"\u2b58<span foreground='red'><sup>\uf444</sup></span>\",\n      \"dnd-inhibited-none\": \"\u2b58\"\n    },\n
"},{"location":"void-desktop-setup/Notifications/#mako","title":"Mako","text":"

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\n

Mako may be configured by editing .config/mako/config.

$ cp -r {config-files-repo}/mako .config/\n

Mako needs to be started by Wayfire in .config/wayfire.ini.

[autostart]\nnotifications = mako\n
"},{"location":"void-desktop-setup/Post-install/","title":"Config files","text":"

The post install section elaborates on the installation and configuration of certain applications. To simplify this and the subsequent sections, reference is made to pre-made configuration files with {config-files-repo}.

A configuration files repository may be chosen to one's preference, by cloning them with the git command. It is recommended to do this once a user has been created.

$ git clone {config-files-repo}\n

Some possible configuration files repositories.

Note that a configuration files repository may not contain all the configuration files mentioned in this wiki.

"},{"location":"void-desktop-setup/Provisioning-with-LVM/","title":"Provisioning","text":"

First off the drive should be partitioned, possibly with fdisk or cfdisk. 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>\n

And the encrypted filesystem of the root partition.

# cryptsetup luksFormat /dev/<disk2> --type luks2 --label luks\n# cryptsetup open --type luks /dev/<disk2> lv0\n

Now to create a new LVM volume group:

# vgcreate lv0 /dev/mapper/lv0\n

To create partitions inside the volume group:

# lvcreate --name root -L 64G lv0\n# lvcreate --name home -l 100%FREE lv0\n

To create the filesystems on the logical partitions:

# mkfs.ext4 -L root /dev/mapper/lv0-root\n# mkfs.ext4 -L home /dev/mapper/lv0-home\n

Other filesystems can also be used but ext4 is the standard for most linux distrobutions. Other sizes for the partitions can also be used depending on the needs of the user.

"},{"location":"void-desktop-setup/Provisioning/","title":"Provisioning","text":"

First off the drive should be partitioned, possibly with fdisk or cfdisk. 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>\n

And the encrypted filesystem of the root partition.

# cryptsetup luksFormat /dev/<disk2> --type luks2 --label luks\n# cryptsetup open --type luks /dev/<disk2> root\n# mkfs.ext4 -L root /dev/mapper/root\n

Other filesystems can also be used but ext4 is the standard for most linux distobutions.

"},{"location":"void-desktop-setup/Repositories/","title":"Repositories","text":"

To install the official Void Linux 32-bit and nonfree repositories simply install their respective packages:

# xbps-install -Sy void-repo-multilib void-repo-nonfree void-repo-multilib-nonfree\n
# xbps-install -Sy void-repo-nonfree\n

And update the repositories:

# xbps-install -S\n
"},{"location":"void-desktop-setup/Repositories/#our-unofficial-extra-repository","title":"Our unofficial extra repository","text":"

There is also our unofficial 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,

repository=https://git.bijl.us/lnco/xbps-ample/raw/branch/main/current\nrepository=https://git.bijl.us/lnco/xbps-ample/raw/branch/main/current/nonfree\n
repository=https://git.bijl.us/lnco/xbps-ample/raw/branch/main/current/musl\n

And refresh the repositories:

# xbps-install -S\n
"},{"location":"void-desktop-setup/Screenshots/","title":"Screenshots","text":"

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\n

And bind them in .config/wayfire.ini.

[command]\nbinding_screenshot = KEY_SYSRQ\nbinding_screenshot_interactive = <ctrl> <super> KEY_S\ncommand_screenshot = grim - | wl-copy -t image/png\ncommand_screenshot_interactive = pkill -9 slurp ; grim -g \"$(slurp -d)\" - | wl-copy -t image/png\n

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.

"},{"location":"void-desktop-setup/Secure-boot/","title":"Secure boot","text":"

Secure boot is sometimes a necessity when working with a windows dual boot on laptops and also an extra layer of protection for your system.

For linux to work with secureboot it's necessary to enroll keys using sbctl.

xbps-install -Sy sbctl sbsigntool\n

Then to create keys, enroll them and sign the executables with it.

# sbctl create-keys\n# sbctl enroll-keys\n# sbctl sign -s /boot/EFI/Boot/BOOTX64.EFI\n# sbctl sign -s /boot/EFI/gummiboot/gummibootx64.efi\n# sbctl sign -s /boot/vmlinuz-<version>\n

If you get an error with enrolling the keys it might be necessary to add the --microsoft flag.

Then to check if it worked.

# sbctl verify\n

The kernels can automatically be signed after an update thanks to the sbsigntool package. Configure it /etc/default/sbsigntool-kernel-hook and change the options:

SBSIGN_EFI_KERNEL=1\n\nEFI_KEY_FILE=/usr/share/secureboot/keys/db/db.key\nEFI_CERT_FILE=/usr/share/secureboot/keys/db/db.pem\n

Don't forget to turn on secureboot in your bios!

To check if your system is actually using secureboot run:

$ sbctl status\n
"},{"location":"void-desktop-setup/Session-manager/","title":"Session manager","text":"

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\n

Then to enable them:

# ln -s /etc/sv/seatd /var/service\n# ln -s /etc/sv/turnstiled /var/service\n

To be able to use seatd it is necessary that the user is added to the _seatd group.

# usermod -aG _seatd <user>\n

For turnstile to function configure /etc/pam.d/system-login by adding the line:

session optional pam_turnstile.so\n

Make sure turnstile also creates a Runtime Directory by enabling it in /etc/turnstile/turnstiled.conf.

manage_rundir = yes\n
"},{"location":"void-desktop-setup/Taskbar/","title":"Taskbar","text":"

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\n

Waybar may be configured by editing .config/waybar/config.

$ cp -r {config-files-repo}/waybar .config/\n

Also make sure that Waybar and network-manager-applet are started by Wayfire.

[autostart]\nbar = waybar\nnetwork = sleep 1; nm-applet --indicator\n
"},{"location":"void-desktop-setup/Users/","title":"Users","text":"

A user should be added to improve security of the system.

# useradd <user>\n

Configure a password for the user:

# passwd <user>\n

The user may be added to certain groups, to give it some rights.

# usermod -aG wheel,audio,video,kvm,tty,input,storage <user>\n

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\n

Then remove sudo.

# xbps-remove -Ry sudo\n

The sudo package will be replaced by opendoas. To install it:

# xbps-install -Sy opendoas \n

Symlink it to /bin/sudo so that applications which require root can still be granted by the user.

# ln -s /bin/doas /bin/sudo\n

And edit /etc/doas.conf to give users in the wheel group access to the doas command.

permit persist :wheel as root\n

To finalize this section, the .bashrc and .bash_profile configuration files will be copied to the home space of the user.

$ cp {config-files-repo}/bash/.bashrc .bashrc\n$ cp {config-files-repo}/bash/.bash_profile .bash_profile\n
"},{"location":"void-desktop-setup/Users/#user-directories","title":"User directories","text":"

It is generally beneficial to set default user directories. To obtain some consistency in the home directory. This may be obtained with the xdg-user-dirs package.

It may be installed with.

# xbps-install -Sy xdg-user-dirs\n

then run:

$ xdg-user-dirs-update\n

This will create a whole suite of default user directories and in .config it will create user-dirs.dirs and user-dirs.locale.

With .config/user-dirs.dirs the syntax of of the directories may be set.

$ cp {config-files-repo}/xdg-user-dirs/user-dirs.dirs .config/\n

Then to persist the modifications.

$ xdg-user-dirs-update\n
"},{"location":"void-desktop-setup/Using-swap/","title":"Using swap","text":"

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\n

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\n# mkswap /swapfile\n# swapon /swapfile\n

To mount the swap to the system at boot, add the swapfile to your /etc/fstab:

/swapfile none swap defaults 0 0\n

And do not forget to reconfigure the kernel after updating/etc/fstab:

# xbps-reconfigure -f linux<version>\n
"},{"location":"void-desktop-setup/Window-manager/","title":"Window manager","text":"

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\n

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\n

Wayfire can be configured by editing .config/wayfire.ini.

$ cp {config-files-repo}/wayfire/wayfire.ini .config/\n

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 {config-files-repo}/wayfire/wayfire-run /usr/local/bin/\n
"},{"location":"xbps-ample/First-setup/","title":"First setup","text":"

This page is still unfinished

"},{"location":"xbps-ample/First-setup/#setting-up-your-own-custom-xbps-repository","title":"Setting up your own custom xbps repository","text":""},{"location":"xbps-ample/First-setup/#creating-a-xbps-package","title":"Creating a xbps package","text":"

For your repository you want to create a package, this can be done multiple ways but this repository was created using xbps-src with which you can create .xbps files that can be installed.

First you have to set up xbps-src. After that we can create an xbps package using

$ ./xbps-src pkg <foo>\n

which will compile a <foo>.xbps in hostdir/binpkgs. To create your own package using xbps-src you'll have to create a template file. After that you can compile the package and install it for testing using:

# xbps-install --repository hostdir/binpkgs <foo>\n

Or if you download the xtools packages you can install it using:

# xi <foo>\n

(Note that you have to be in the void-packages/ directory)

If the package is working it is ready to be put in the repository.

"},{"location":"xbps-ample/First-setup/#making-the-repository","title":"Making the repository","text":"

Now that we have a package we can make a repository. But first we'll have to create a local one. Make an empty directory. Then copy over your .xbps file from the package you want to add into the directory. If you created them using xbps-src they will be in void-packages/hostdir/binpkgs/.

After that we can add the packages to the repository data. This will be necessary for the xbps package manager to find the packages. To add all the packages in the directory to the repository data you can issue the command:

$ xbps-rindex -a /path/to/repository/directory/*.xbps\n

There should now be an x86_64-repodata or x86_64-musl-repodata file in your directory.

(If you wanted to create a local repository than after this you would only have to add the repository to your xbps configuration and you'd be done. But in this guide we're going to make a remote repository.)

"},{"location":"xbps-ample/First-setup/#signing-the-repository-and-the-packages","title":"Signing the repository and the packages","text":"

Now that we have our repository we're going to need to sign it with a key. To generate a key we can use the command:

$ ssh-keygen -t rsa -m PEM -f private.pem\n

This will create a private.pem which we can use to sign the repository and the packages. First we want to sign the repository which only has to be done once. This can be done with:

$ xbps-rindex --privkey private.pem --sign --signedby \"<name>\" /path/to/repository/directory\n

Here the <name> has to be replaced with the name you want to sign the repository with. And the /path/to/repository/directory has to be replaced with the directory where the packages are located.

After that we also want to sign the packages themselves. To achieve this we use the command:

$ xbps-rindex --privkey private.pem --sign-pkg /path/to/repository/directory/*.xbps\n

Everytime we add or update packages we'll have to sign them again.

"},{"location":"xbps-ample/First-setup/#hosting-the-repository","title":"Hosting the repository","text":"

Although there are a lot of ways to host the repository this repository is being hosted on a git server. It is a fairly easy process and doesn't require a whole lot of knowledge but there are probably more optimal ways of hosting a repository.

"},{"location":"xbps-ample/Home/","title":"Welcome to the xbps-ample wiki","text":"

This is a small wiki about xbps-ample and hosting your own xbps repository. These guides were made on an x86-64 machine but should be mostly applicable to other architectures as well.

A lot of this information can be found in the Void Linux documentation and the manual pages.

Check the sidebar for all pages in this wiki!

"},{"location":"xbps-ample/Maintaining-packages/","title":"Maintaining packages","text":"

This page is still unfinished

"},{"location":"xbps-ample/Maintaining-packages/#maintaining-packages-in-your-own-repository","title":"Maintaining packages in your own repository","text":"

It is important to maintain your repository when updates occur or if you want to add/remove packages. This page explains how to. Note that after changing any files in your repository that you'll have to update them upstream. E.g. uploading the correct files.

"},{"location":"xbps-ample/Maintaining-packages/#adding-packages","title":"Adding packages","text":"

To add a package we first have to copy over the .xbps files to the repository directory. After that we can add them to the repository's *-repodata. You can add them by using:

$ xbps-rindex -a /path/to/repository/directory/*.xbps\n

We also have to sign the package with the key we generated whilst we set up the repository. This can be done by using:

$ xbps-rindex --privkey private.pem --sign-pkg /path/to/repository/directory/*.xbps\n
"},{"location":"xbps-ample/Maintaining-packages/#updating-packages","title":"Updating packages","text":"

If you have a new version of a package and want to add it to the repository there are a few steps that need to be done.

First add the new package to the repodata.

$ xbps-rindex -a /path/to/repository/directory/*.xbps\n

And then remove the obsolete packages.

$ xbps-rindex -r /path/to/repository/directory/\n

Don't forget to sign the added packages

$ xbps-rindex --privkey private.pem --sign-pkg /path/to/repository/directory/*.xbps\n
"},{"location":"xbps-ample/Maintaining-packages/#removing-packages","title":"Removing packages","text":"

To remove a package you'll first have to remove the files from the repository and it's signature:

$ rm /path/to/repository/directory/<foo>*\n

After that you'll have to evoke xbps-rindex to clean up the repodata:

$ xbps-rindex -c /path/to/repository/directory/\n
"},{"location":"xbps-ample/Multiple-repositories/","title":"Hosting multiple repositories","text":"

This page is still unfinished

(A page about having multiple repositories like an musl or nonfree repository on top of another one)

"}]}