Installation

Installation is pretty straight-forward, and this step-by-step guide is supposed to be on a fresh Artix Linux installation (with the Dinit init system), since it changes some things system-wide. This guide assumes a base installation (with base, linux and linux-firmware installed), compilation tools (base-devel), any CLI text editor, and GRUB as the bootloader.

Make a New User ~

First, make sure you're working from the root user, then create a new user in the wheel and video groups with a new home directory, and set a strong password:

useradd -mG wheel,video [username]
passwd [username]

Afterwards, edit the /etc/sudoers file and uncomment the line that gives the wheel group access to privilege elevation:

%wheel ALL=(ALL:ALL) ALL

You can also disable per-TTY authentication (so that one terminal can "reuse" the authentication from another terminal), set a longer value for the password timeout (instead of the default 5 minutes), add password feedback (with asterisks), have it not ask you for a password (for common mounting, updating, and power-related commands), and let it insult you when you type the password wrong. The entire configuration should look like this:

# sudoers configuration

root ALL=(ALL:ALL) ALL
%wheel ALL=(ALL:ALL) ALL

Cmnd_Alias MOUNTING = \
  /usr/bin/mount, \
  /usr/bin/umount, \
  /usr/bin/mkdir -p /mnt/*, \
  /usr/bin/rmdir /mnt/*
Cmnd_Alias CRYPT = \
  /usr/bin/cryptsetup open *, \
  /usr/bin/cryptsetup close *
Cmnd_Alias UPDATING = \
  /usr/bin/pacman -Syu, \
  /usr/bin/pacman -Syyu
Cmnd_Alias POWER = \
  /usr/bin/shutdown, \
  /usr/bin/reboot, \
  /usr/bin/poweroff, \
  /usr/bin/loginctl suspend

%wheel ALL=(ALL:ALL) NOPASSWD: MOUNTING, CRYPT, UPDATING, POWER

Defaults editor=/usr/bin/nvim
Defaults !tty_tickets
Defaults timestamp_timeout=10
Defaults pwfeedback
Defaults insults

@includedir /etc/sudoers.d

That's your new user with accessible sudo privileges and ability to control screen brightness! You can exit and log into the new user now, since you're able to run privileged commands with sudo.

pacman Setup ~

General Configuration ~

To enable colors, eye-candy, parallel downloads, and package list tabulation in pacman, use your text editor (with sudo of course) and add these settings in /etc/pacman.conf where relevant:

Color
ILoveCandy
ParallelDownloads = 5
VerbosePkgLists

Repository Configuration ~

You will also want to install support for Arch repositories on Artix, for a more extensive software collection:

sudo pacman --noconfirm --needed -S artix-archlinux-support

Afterwards, enable the "extra" Arch repository on /etc/pacman.conf, and make sure your addition is after the listing of Artix repositories (so that Artix packages are preferred whenever possible). It should look something like so:

# Artix
[system]
Include = /etc/pacman.d/mirrorlist

[world]
Include = /etc/pacman.d/mirrorlist

[galaxy]
Include = /etc/pacman.d/mirrorlist

# Arch
[extra]
Include = /etc/pacman.d/mirrorlist-arch

Finally, update your entire package database, initialize the keyring, and set up the trusted keys for verifying packages from the Arch repositories:

sudo pacman -Sy --noconfirm
sudo pacman-key --init
sudo pacman-key --populate archlinux

32-Bit Repository Configuration ~

If you want 32-bit support on Artix (for your own personal usage, like using Wine or Steam), also install the support for 32-bit Arch repositories on Artix, for a more extensive software collection:

sudo pacman --noconfirm --needed -S lib32-artix-archlinux-support

Afterwards, enable the "lib32" Artix repository and the "multilib" Arch repository on /etc/pacman.conf (and always remember that the order matters):

# Artix
[lib32]
Include = /etc/pacman.d/mirrorlist

# Arch
[multilib]
Include = /etc/pacman.d/mirrorlist-arch

As always, update your entire package database:

sudo pacman -Sy --noconfirm

makepkg Setup ~

For efficiency purposes, edit the relevant line in /etc/makepkg.conf to enable parallel compilation using your available CPU cores (replace 4 with the actual count of your cores, which you can find by running nproc):

MAKEFLAGS="-j4"

Install the Programs ~

AUR Helper ~

Some programs aren't hosted on the official repositories, and are instead residing in the AUR (Arch User Repository). To access them, yay is arguably the best AUR helper out there, so you'll need to clone yay-bin (the pre-compiled binary) using git and install it:

cd ~/
sudo pacman -S --noconfirm --needed git
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin/
makepkg -si
cd ../
rm -rf yay-bin/

Repository Packages ~

To install the core programs and dependencies from the official repositories and the AUR (as listed on Programs), run the following yay command (without sudo, it takes care of that):

yay -S --noconfirm --needed aerc bat bluez bluez-dinit bluez-utils brightnessctl chafa cryptsetup dash dbus dbus-dinit dbus-dinit-user dhcpcd dhcpcd-dinit dinit dunst elogind elogind-dinit eza fastfetch ffmpeg fish fontconfig htop imagemagick impala isync iwd iwd-dinit jq lf libnotify librewolf maim man-db mpc mpd mpd-dinit mpv ncmpcpp neovim newsraft noto-fonts noto-fonts-cjk noto-fonts-extra numlockx openntpd openntpd-dinit openssh pass picom pipewire pipewire-alsa pipewire-dinit pipewire-jack pipewire-pulse pipewire-pulse-dinit pulsemixer reflector slop soundfont-fluid tesseract tesseract-data-eng ttf-dejavu ttf-jetbrains-mono-nerd userspawn userspawn-dinit w3m wireplumber wireplumber-dinit xclip xf86-input-libinput xorg-server-common xorg-server-tearfree xorg-xinit xorg-xprop xorg-xset xorg-xsetroot xorg-xwininfo xwallpaper yt-dlp zathura zathura-cb zathura-djvu zathura-pdf-mupdf ttf-twemoji freetype2 fribidi imlib2 libexif libx11 libxcb libxext libxfixes libxft libxi libxinerama libxrandr libxrender libxss

Git Packages ~

I've forked and edited the source code of some programs (dmenu, dwm, dwmblocks, nsxiv, slock, and st) and also made my own (autolock and drag). They're all hosted under their respective Git repositories. You'll need to use git to get them:

mkdir Programs/
cd Programs/
git clone https://codeberg.org/ayari/autolock
git clone https://codeberg.org/ayari/dmenu
git clone https://codeberg.org/ayari/drag
git clone https://codeberg.org/ayari/dwm
git clone https://codeberg.org/ayari/dwmblocks
git clone https://codeberg.org/ayari/nsxiv
git clone https://codeberg.org/ayari/slock
git clone https://codeberg.org/ayari/st

These programs must be compiled and installed manually (obviously). To do that, cd into each one of the cloned directories and run sudo make clean install:

for i in autolock/ dmenu/ drag/ dwm/ dwmblocks/ nsxiv/ slock/ st/; do cd $i; sudo make clean install; cd ../; done

If you receive any error, it might be because you're missing one of the dependencies listed in Programs > Git > Build Dependencies. Once you're done with all the programs, you can safely remove the Programs/ directory with all its sub-directories.

Dinit Service Setup ~

On Artix (with Dinit), the system-wide services are separately provided in the Artix repositories (under the *-dinit name). Since you've already installed them, all you need to do is enable them to get service functionality for some installed programs:

sudo dinitctl enable bluetoothd
sudo dinitctl enable dbus
sudo dinitctl enable dhcpcd
sudo dinitctl enable elogind
sudo dinitctl enable iwd
sudo dinitctl enable ntpd

Keyboard Setup ~

In case your keyboard's layout isn't QWERTY, you can edit /etc/X11/xorg.conf.d/00-keyboard.conf to set up an alternative layout for X11. Here's an example for the AZERTY layout:

Section "InputClass"
  Identifier "system-keyboard"
  MatchIsKeyboard "on"
  Option "XkbLayout" "fr"
EndSection

If your keyboard has an AZERTY layout, uncomment the AZERTY keybindings in my dwm build's config.def.h and comment the QWERTY ones.

You can also edit /etc/vconsole.conf to permanently set the keyboard layout for the virtual console (TTY), instead of running loadkeys all the time:

KEYMAP=fr

libinput Setup ~

X11's libinput has two annoying defaults, especially for laptops and gaming:

  1. Tapping on the touchpad doesn't click.
  2. Mouse input is disabled while typing.

To fix these issues, add the following lines in /etc/X11/xorg.conf.d/40-libinput.conf's "InputClass" section:

Option "Tapping" "on"
Option "DisableWhileTyping" "0"

Autologin Setup ~

It's important to set up autologin for your user on tty1! Copy the default agetty configuration over to its tty1 counterpart:

cp /etc/dinit.d/config/agetty-default.conf /etc/dinit.d/config/agetty-tty1.conf

Then, change the corresponding GETTY_ARGS line to:

GETTY_ARGS="--skip-login --nonewline --noissue --autologin [username]"

System Shell Setup ~

To improve script execution performance, you can replace the default bash with dash for the system shell (/bin/sh); the Scripts are all POSIX-compliant, so don't worry about "bashisms." You can symlink it like so:

sudo ln -sfT dash /usr/bin/sh

Next, you need to create a pacman hook (in /etc/pacman.d/hooks/dashbinsh.hook, for example) so that future updates to bash don't overwrite your symlink:

[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Target = bash

[Action]
Description = Re-pointing /bin/sh symlink to dash...
When = PostTransaction
Exec = /usr/bin/ln -sfT dash /usr/bin/sh
Depends = dash

Interactive Shell Setup ~

The last step is to change your user's shell to fish:

chsh -s $(which fish) [username]

You can also change the shell for the root user (by running sudo chsh -s $(which fish)), if you want to!

Clone the Dotfiles ~

Once you're done with all of the above, you can now reboot and you will automatically be logged into your new user on tty1!

Using git again, clone my dotfiles on your ~/ (i.e., the user's $HOME directory):

cd ~/
git clone https://codeberg.org/ayari/dotfiles
cd dotfiles
mv -f .config/ .local/ ~
cd ~/
rm -rf dotfiles

Dinit User Service Setup ~

To set up user services on Dinit, you must use userspawn (which manages sessions on a per-user basis) to enable the user services needed for a functioning desktop environment (such as DBus and PipeWire):

dinitctl --user enable dbus
dinitctl --user enable mpd
dinitctl --user enable pipewire
dinitctl --user enable pipewire-pulse
dinitctl --user enable wireplumber

You may want to log off your user and log back in for proper changes to take place, and that's about everything. Make sure to read the documentation, and enjoy your new system! <3