Skip to content

Instantly share code, notes, and snippets.

@slash071
Created April 30, 2023 18:27
Show Gist options
  • Save slash071/ee74290e3157e5518d05e4b7c590ffb2 to your computer and use it in GitHub Desktop.
Save slash071/ee74290e3157e5518d05e4b7c590ffb2 to your computer and use it in GitHub Desktop.
My personal Void Linux installation

🌱 Installation

  • Network

    Before we begin, you must have the NetworkManager package installed on your system:

    # xbps-install -u xbps
    # xbps-install -S NetworkManager
    

    First disable any other network management services, such as dhcpcd, wpa_supplicant, or wicd. These services all control network interface configuration, and will interfere with NetworkManager:

    # rm /var/service/dhcpcd
    # rm /var/service/wpa_supplicant
    

    Then ensure that the dbus service is enabled and running & finally, enable the NetworkManager service:

    # ln -s /etc/sv/dbus /var/service/
    # ln -s /etc/sv/NetworkManager /var/service/
    

 

  • Nonfree Repository

    Void has a nonfree repository for packages that don't have free licenses. It can be enabled by installing the void-repo-nonfree package.

    # xbps-install -S void-repo-nonfree
    

 

  • Packages

    Before installing packages, do a full system upgrade:

    # xbps-install -Su
    

    Required packages:

    linux-firmware linux-headers intel-ucode
    vim nano opendoas base-devel terminus-font git wget dejavu-fonts-ttf
    traceroute net-tools openresolv wireless_tools bind-utils ntp xclip
    dialog pulseaudio alsa-plugins-pulseaudio alsa-utils gvfs
    bluez xdg-utils xdg-user-dirs xdg-user-dirs-gtk libinput grub
    efibootmgr dosfstools mtools ntfs-3g os-prober bash-completion
    

 

🎼 Configure the System

  • GRUB

    For enabling os-prober to detect other operating systems, Add or uncomment line below to /etc/default/grub file:

    GRUB_DISABLE_OS_PROBER=false
    

    Then regenerate grub.cfg:

    # grub-mkconfig -o /boot/grub/grub.cfg
    

 

  • System Tweaks

    • Change console font in /etc/rc.conf :

      FONT="ter-dXXb.psf.gz"
      

      Fonts are stored in /usr/share/kbd/consolefonts/

    • Change Shell

      # su
      # chsh -s /bin/bash 
      
    • Creating Default Directories

      # makewhatis -a
      # xdg-user-dirs-update
      
    • Localization

      Uncomment relevant lines in /etc/default/libc-locales:

      en_US.UTF-8 UTF-8
      en_US ISO-XXXX-X
      fa_IR UTF-8
      

      Force-reconfigure the glibc-locales package:

      # xbps-reconfigure glibc-locales --force
      
    • Time Zone

      # ln -sf /usr/share/zoneinfo/<Region>/<City> /etc/localtime
      

      In my case: # ln -sf /usr/share/zoneinfo/Asia/Tehran /etc/localtime

      # hwclock --systohc
      

      To maintain accuracy of your system's clock, Enable isc-ntpd service to use NTP.

       

  • sudo

    Append this to your /etc/sudoers.d/wheel :

    %wheel ALL=(ALL) NOPASSWD: /usr/bin/halt, /usr/bin/reboot, /usr/bin/poweroff, /usr/bin/shutdown
    

    Also make sure line %wheel ALL=(ALL:ALL) ALL is in there. If it's not, add it there or uncomment it from the sudoers file.

 

  • doas

    Pasted code below in /etc/doas.conf :

    permit :wheel
    permit nopass :wheel as root cmd halt
    permit nopass :wheel as root cmd reboot
    permit nopass :wheel as root cmd poweroff
    permit nopass :wheel as root cmd shutdown
    
    

    Note: The configuration file must end with a blank line.

    The owner and group for /etc/doas.conf should both be 0, file permissions should be set to 0400:

    # chown -c root:root /etc/doas.conf
    # chmod -c 0400 /etc/doas.conf
    

 

  • Add DNS Servers

    To configure the NetworkManager to use resolvconf, paste these lines inside /etc/NetworkManager/conf.d/rc-manager.conf:

    [main]
    rc-manager=resolvconf
    

    Add DNS servers in /etc/resolvconf.conf like below:

    name_servers="8.8.8.8 8.8.4.4"
    

    Force resolvconf to update all its subscribers:

    # resolvconf -u
    

 

  • Disable beep sound (Unloading the pcspkr kernel module)

    To unloade the pcspkr kernel module, paste line below in /etc/modprobe.d/nobeep.conf:

    blacklist pcspkr
    

    After reboot, changes will affect automatically.

     

  • Configure touchpad

    Paste these lines in /etc/X11/xorg.conf.d/30-touchpad.conf:

    Section "InputClass"
      Identifier "devname"
      Driver "libinput"
      Option "Tapping" "on"
      Option "NaturalScrolling" "true"
    EndSection
    

 

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment