Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

kolyamba2105/arch-configs

Repository files navigation

Arch Linux setup process

Mostly following Arch installation guide.

Pre-installation

Connect to the Internet

  • Run iwctl (iNet wireless daemon interactive prompt)

  • From interactive prompt:

    • device list
    • station device scan
    • station device get-networks
    • station device connect network

Update the system clock

  • Use timedatectl to ensure the system clock is accurate
timedatectl set-ntp true
  • Verify service status
timedatectl status

Partition the disks

  • List available devices
fdisk -l
  • Start fdisk interactive prompt
fdisk <disk-name>
  • From interactive prompt:

    • g - create a new empty GPT partition table
    • n - add a new partition
    • t - change partition type
    • w - write table to disk and exit
  • Partition table:

    1. EFI partition (Size: +1G; Type: EFI System)
    2. Swap partition (Size: +2G; Type: Linux swap)
    3. Root partition (Size: remainder; Type: Linux filesystem)

Format the partitions

  1. EFI

    mkfs.fat -F32 /dev/<efi-partition-name>
  2. Swap

    mkswap /dev/<swap-partition-name>
  3. Root

    mkfs.ext4 /dev/<root-partition-name>

Mount the file systems

  1. Root

    mount /dev/<root-partition-name> /mnt
  2. Swap

    swapon /dev/<swap-partition-name>

Installation

Install essential packages

pacstrap /mnt base base-devel linux linux-firmware linux-headers git neovim

Configure the system

Generate file system table

genfstab -U /mnt >> /mnt/etc/fstab

Chroot

arch-chroot /mnt

Time zone

ln -sf /usr/share/zoneinfo/Europe/Kiev /etc/localtime
hwclock --systohc

Localization

  • Edit /etc/locale.gen and uncomment en_US.UTF-8 UTF-8 and other needed locales:

    • pl_PL.UTF-8 UTF-8
    • ru_RU.UTF-8 UTF-8
    • uk_UA.UTF-8 UTF-8
  • Generate the locales by running locale-gen

Network configuration

  • Create the hostname file
nvim /etc/hostname

Type the hostname (for ex. Lenovo-ThinkPad)

  • Create hosts file
nvim /etc/hosts

Add the following content:

127.0.0.1     localhost
::1           localhost
127.0.1.1     Lenovo-ThinkPad.localdomain Lenovo-ThinkPad

Users and passwords

  • Set the root password
passwd
  • Add non-root user
useradd -m <user-name>
  • Set password for non-root user
passwd <user-name>
  • Add non-root user to groups
usermod -aG wheel,audio,video,optical,storage <user-name>
  • Edit sudoers file
EDITOR=nvim visudo

Uncomment the following line: %wheel ALL=(ALL) ALL

Boot loader

  • Install grub and other helper packages
pacman -S grub efibootmgr dosfstools os-prober mtools
  • Create EFI directory
mkdir /boot/EFI
  • Mount EFI partition
mount /dev/<efi-partition-name> /boot/EFI
  • Install grub on EFI partition
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
  • Generate grub configuration file
grub-mkconfig -o /boot/grub/grub.cfg

Before reboot

  • Install network tools
pacman -S dhcpcd dialog netctl wpa_supplicant

Reboot

  • Exit chroot environment
exit
  • Unmount root partition
umount -R /mnt
  • Reboot and remove installation media

Post-installation

Clone this repo

git clone https://github.com/kolyamba2105/arch-configs.git configs

cd ~/configs

git submodule init
git submodule update

Install yay

git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd
rm -rf yay

Clone my-wallpapers repo

mkdir ~/Pictures
cd ~/Pictures
mkdir Screenshots
git clone https://github.com/kolyamba2105/my-wallpapers.git

Install packages

  • Install official packages
cd ~/configs/pacman
pacman -S --needed - < pkgs.txt
  • Install packages from AUR
cd ~/configs/pacman
yay -S --needed - < foreign-pkgs.txt

Setup config files

cd ~/configs
sh setup.sh

Setup ZSH

Install ohmyzsh

Setup XMonad

Setup guide

Log into graphical environment

Just reboot and follow the final steps...

Setup Neovim

Setup guide

Setup SSH

  • Generate ssh key
ssh-keygen
  • Add content of ~/.ssh/id_rsa.pub to Github

Update GRUB config

  • Add/modify the following lines to /etc/default/grub
# Save last used kernel
GRUB_DEFAULT=saved

# Show all available kernels
GRUB_DISABLE_SUBMENU=y

# Use last selected kernel
GRUB_SAVEDEFAULT=true

# This will make GRUB menu disappear immediately
GRUB_TIMEOUT=0

# This will decrease the amount of logs during start-up
GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 vga=current"

# This will fix a problem with laptop brightness (on Lenovo ThinkPad E580)
GRUB_CMDLINE_LINUX="intel_backlight.enable_dpcd_backlight=0"
  • Update grub (generate grub config file again)
sudo grub-mkconfig -o /boot/grub/grub.cfg
  • Reboot

Touchpad setup

Create /etc/X11/xorg.conf.d/99-synaptics-overrides.conf file and add the following content:

Section "InputClass"
        Identifier "touchpad overrides"
        Driver "libinput"
        MatchIsTouchpad "on"
        Option "Tapping" "on"
EndSection

Power management settings

  • Edit /etc/systemd/logind.conf file, here is a default configuration
  • Apply changes with systemctl kill -s HUP systemd-logind or just reboot

Screen lock setup

  • Create /etc/systemd/system/slock@.service file and add the following content:
[Unit]
Description=Lock X session using slock for user %i
Before=sleep.target

[Service]
User=%i
Environment=DISPLAY=:0
ExecStartPre=/usr/bin/xset dpms force suspend
ExecStart=/usr/bin/slock

[Install]
WantedBy=sleep.target
  • Enable service
systemctl enable slock@<user-name>.service

Pacman settings

Update mirrors

  • Update mirror list with reflector:
reflector @/etc/xdg/reflector/reflector.conf

Setup list-pkgs hook

  • Make list-pkgs.sh executable:
chmod u+x ~/configs/pacman/list-pkgs.sh
  • Create a symlink:
sudo ln ~/configs/pacman/list-pkgs.sh /usr/local/bin/list-pkgs
  • Copy list-pkgs.hook into Pacman hooks directory:
sudo cp ~/configs/pacman/list-pkgs.hook /usr/share/libalpm/hooks/
  • Repeat similar procedure for list-foreign-pkgs hook

Setup scripts

  • Make each script in scripts directory executable
  • Link each script to /usr/local/bin/<script-name>

Connect HDD

  • Use fdisk to partition the disk
# Create the only partion of type "Linux FileSystem"
fdisk /dev/sda
  • Format partition
mkfs.ext4 /dev/sda1
  • Add an entry in /etc/fstab file
# Retrieve disk UUID
lsa /dev/disk/by-uuid
  • Create mount point
mkdir /hdd
  • Re-mount
mount -a
  • Change permissions
chgrp storage /hdd
chmod 775 /hdd

# This may be optional if user was already added to storage group
gpasswd -a <user-name> storage

Useful Wiki pages

About

Arch Linux config files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors