CONFIGURATION

Additional user

We now create a normal user. We are going to include the new user in some basic groups so we can operate the basic fuctions of the system once we are logged with the normal user credentials. Then, we create a password for the user.


    # useradd -m -g users -G wheel,audio,video,input,storage,network -s /bin/bash [your-user-name]
    # passwd [your-user-name]
        

To allow the user to escalate privileges using sudo to administer the system, it is necesary to edir the file /etc/sudoers. There, we are going to look for the following line and delete tue "#" caracter to "uncoment" it and activate the option.


    %wheel ALL=(ALL:ALL) ALL/
        

NetworkManager

For the time being, defining the structure of this


    
        

Driver Installation

Time to install the xorg graphical server, the window manager, a terminal (alacritty), some utilities and the graphical drivers. In this computer, we do not have a dedicated graphic card. The Intel CPU manages the graphics, so we install the intel graphic drivers:


    # xbps-install -Sy xorg-server xorg-apps xinit icewm alacritty dbus elogind 
    mesa-dri intel-video-accel intel-media-driver mesa-intel-driver
        

We now enable some basic services. In Void Linux this is done creating a simbolic link for each service in /var/services/


    # ln -s /etc/sv/dbus /var/service/
    # ln -s /etc/sv/elogind /var/service/
        
Services explanation...

Desktop manager...

We could also install a desktop manager like lightdm

Trim

In order to allow fstrim command to work over a LUKS encrypted partition, we must explicitly instruct the container to allow the discarding of free blocks. We have to open the file /etc/default/grub and lok fort the line containing GRUB_CMDLINE_LINUX_DEFAULT to add rd.luks.allow-discards=1 resulting in something like:


    GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 rd.lvm=1 rd.luks.uuid=[your-UUID] rd.luks.allow-discards=1"
        

Now, regenerate GRUB configuration and initramfs to apply the changes. Then activate the service creating the service:


    # grub-mkconfig -o /boot/grub/grub.cfg
    # xbps-reconfigure -fa
    # ln -s /etc/sv/fstrim /var/service/
        
Trim explanation...

Trim

NetworkManager

We have been using an usb-c to Ethernet adaptor during the system installation, controlled by the dhcpcd service. We now are goin to install NetworkManager to manage the networks. Then we enable the corresponding service and dissable dhcpd.


    # xbps-install -Sy NetworkManager network-manager-applet
    # ln -sf /etc/sv/NetworkManager /var/service/
    # rm -f /var/service/dhcpcd
        

NetworkManager will allow us to manage wired and wifi network connections.

All worked fine for a couple of days until the computer could not longer resolve addresses. Long story short, I was in a different network and the gateway ip address was differento to that fixed in /etc/resolv.conf during the first part of the installation.

I can not remember how I configured the DNS. It had to be through nmcli or nmtui. In any case, the current running configuration is supposed to be in /run/NetworkManager/resolv.conf.

We are going to delete the /etc/resolv.conf file and make it be a link to the running configuration of NetworkManager:


    # sudo rm /etc/resolv.conf
    # sudo ln -s /run/NetworkManager/resolv.conf /etc/resolv.conf
    # sudo sv restart NetworkManager
        

We can now connect to a network using the mentioned clients or de NetworkManager applet if we are in a graphic sesion. Further research necesary.

nmtui...

nmtui, terminal client program for Network manager.

Locales


    # xbps-install -fy glibc-locales
    # echo "LANG=es_ES.UTF-8" > /etc/locale.conf
    # echo "es_ES.UTF-8 UTF-8" >> /etc/default/libc-locales
    # xbps-reconfigure -f glibc-locales