Skip to content

Instantly share code, notes, and snippets.

@n0nuser
Last active January 22, 2022 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n0nuser/b5b991208465d5cccbc5b5ae3eec294e to your computer and use it in GitHub Desktop.
Save n0nuser/b5b991208465d5cccbc5b5ae3eec294e to your computer and use it in GitHub Desktop.
My Arch Install

Arch Linux Installation - EFI

Pre-Installation

Loading keyboard

loadkeys es

Setting Wi-Fi

systemctl enable iwd
iwctl
station wlan0 scan
station wlan0 get-networks
station wlan0 connect SSID

Adjusting Time zone

timedatectl set-ntp true
timedatectl set-timezone Europe/Madrid

Partitioning

cfdisk /dev/sda
# Partición nueva y se le pone como tipo swap; tanto como gigas de RAM tenga el equipo
# Partición nueva

mkswap /dev/sda5
mkfs.ext4 /dev/sda6

mount /dev/sda6 /mnt
swapon /dev/sda5

Installing Arch Linux

Getting best mirrors

pacman -Syy
pacman -S reflector
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
reflector --latest 20 --sort rate --download-timeout 60 --save /etc/pacman.d/mirrorlist

Installation

pacstrap /mnt base linux linux-firmware iwd dhcpcd man-db nano networkmanager ifplugd mkinitcpio reflector rsync

Configuring the System

Adding EFI boot system

mkdir /mnt/boot/EFI
mount /dev/sda1 /mnt/boot/EFI

Fstab

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

Mounting Windows

If mounted before generating the fstab entry, an entry for mounted Windows would be added and will cause an error at boot since Windows is never mounted by default. (Hope that makes sense)

mkdir /mnt/mnt/windows
mount /dev/sda3 /mnt/mnt/windows

Chroot

arch-chroot /mnt

Time Zone

ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc

Locales and keyboard

sed -i 's/#en_US.UTF-8/es_ES.UTF-8/g' /etc/locale.gen
locale-gen

export LANG=es_ES.UTF-8
echo "LANG=es_ES.UTF-8" > /etc/locale.conf
echo "KEYMAP=es" > /etc/vconsole.conf

Network

echo "nonuser" > /etc/hostname
echo "127.0.0.1	localhost
::1		localhost" > /etc/hosts

Initramfs

mkinitcpio -P

Change Root Password

passwd

Get best mirrors

pacman -Syy
pacman -S reflector
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
reflector --latest 20 --sort rate --download-timeout 60 --save /etc/pacman.d/mirrorlist

Bootloader

pacman -Sy grub efibootmgr os-prober

Add this line to /etc/default/grub:

GRUB_DISABLE_OS_PROBER=false

Add new microcode:

pacman -S intel-ucode
grub-install --target=x86_64-efi --bootloader-id=GRUB --recheck
grub-mkconfig -o /boot/grub/grub.cfg

Finish

exit
reboot

After installation

Localtime

timedatectl set-ntp true
timedatectl set-timezone Europe/Madrid
ln -sf /usr/share/zoneinfo/Europe/Madrid /etc/localtime
hwclock -w
  1. Crear nuevo usuario: useradd -m -s /usr/bin/zsh n0nuser
  2. passwd n0nuser.
  3. Crear grupo sudo con groupadd sudo.
  4. Agregar al usuario nuevo al grupo sudo: usermod -aG sudo n0nuser.
  5. Meter en /etc/doas.conf: permit nopass :sudo.

Network Configuration

Add in /etc/resolv.conf:

nameserver 192.168.1.1
nameserver 1.1.1.1
nameserver 1.0.0.1
nameserver 8.8.8.8
systemctl enable systemd-resolved
systemctl start systemd-resolved
systemctl enable iwd
systemctl start iwd
systemctl enable dhcpcd
systemctl start dhcpcd
systemctl enable ntpd

Configure WiFi again with iwctl.

Package installation

pacman --needed -S zsh xf86-video-intel mesa xorg xorg-server xorg-xinit xclip lightdm lightdm-gtk-greeter neofetch alacritty firefox acpi cmatrix discord wget git cmake vim blueman bluez bluez-utils alsa-utils mlocate ntp retroarch retroarch-assets-xmb retroarch-assets-ozone htop hugo rsync transmission-gtk ntfs-3g brightnessctl unzip python3 python-pip

Uncomment "sudo" in /etc/sudoers file.

pacman -S make fakeroot sudo binutils gcc
git clone https://aur.archlinux.org/yay.git && cd yay
makepkg -sirc
yay -S visual-studio-code-bin
# Updates location of files for: locate
updatedb

Cambiar en /etc/systemd/logind.conf el #HandlePowerKey=poweroff por HandlePowerKey=suspend.

Ricing

Previous install

pacman --needed -S i3-gaps rofi feh mpv mpd thunar scrot dunst volumeicon jq calc ttf-fira-sans lightdm-webkit2-greeter accountsservice light-locker neofetch playerctl perl-anyevent-i3
yay -S picom-ibhagwan-git polybar cli-visualizer spotify ttf-all-the-icons ttf-d2coding plymouth
systemctl enable mpd

Disable all of the apps in /etc/X11/xinit/xinitrc and add exec i3

Oh My Zsh

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Devices

Edit /etc/X11/xorg.conf.d/00-keyboard.conf and add:

Section "InputClass"
	Identifier "system-keyboard"
	MatchIsKeyboard "on"
	Option "XkbLayout" "es,es"
	Option "XkbModel" "pc105
EndSection

Edit /etc/X11/xorg.conf.d/30-touchpad.conf and add:

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

LightDM

doas git clone https://github.com/AlphaNecron/lightdm-gab-nord.git
mv lightdm-gab-nord /usr/share/lightdm-webkit/themes
systemctl enable lightdm

GRUB

git clone https://github.com/vinceliuice/grub2-themes.git
doas grub2-themes/install.sh -b -t slaze
rm -rf grub2-themes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment