From 7d7ae30940f084ddaf79ad2c7db98705b6f15c26 Mon Sep 17 00:00:00 2001 From: z0x Date: Sun, 27 Apr 2025 11:18:33 -0400 Subject: [PATCH] refactor(content): artix install guide synatx improvements --- src/content/artix-install-guide/index.md | 115 ++++++++++++----------- 1 file changed, 58 insertions(+), 57 deletions(-) diff --git a/src/content/artix-install-guide/index.md b/src/content/artix-install-guide/index.md index f024948..f2d51c0 100644 --- a/src/content/artix-install-guide/index.md +++ b/src/content/artix-install-guide/index.md @@ -37,7 +37,7 @@ Use [Rufus](https://rufus.ie/en) ```shell -sudo dd bs=4M if=~/Downloads/artix-base-openrc-*-x86_64.iso of=/dev/sdb1 conv=fsync oflag=direct status=progress +doas dd bs=4M if=~/Downloads/artix-base-openrc-*-x86_64.iso of=/dev/sdb1 conv=fsync oflag=direct status=progress ``` --- @@ -281,10 +281,10 @@ rc-update add NetworkManager rc-update add iwd ``` -``` +```diff -[device] -wifi.backend=iwd ++[device] ++wifi.backend=iwd ``` ### MAC randomization @@ -292,14 +292,14 @@ wifi.backend=iwd > [!info] >MAC randomization can be used for increased privacy by not disclosing your real MAC address to the WiFi network. -```ini +```diff -[device-mac-randomization] -wifi.scan-rand-mac-address=yes ++[device-mac-randomization] ++wifi.scan-rand-mac-address=yes -[connection-mac-randomization] -ethernet.cloned-mac-address=random -wifi.cloned-mac-address=random ++[connection-mac-randomization] ++ethernet.cloned-mac-address=random ++wifi.cloned-mac-address=random ``` ## Localization @@ -357,9 +357,9 @@ echo 'artix' > /etc/hostname ```diff -# Hostname fallback if /etc/hostname does not exist -- hostname="localhost" -+ hostname="odin" +# Use fallback hostname if /etc/hostname doesn't exist +-hostname="localhost" ++hostname="artix" ``` ```ini @@ -378,10 +378,9 @@ echo 'artix' > /etc/hostname In the `HOOKS` array, add `encrypt` between `block` and `filesystems` -```diff +```diff ins="encrypt" showLineNumbers=false -- HOOKS=(... block filesystems ...) -+ HOOKS=(... block encrypt filesystems ...) +HOOKS=(... block encrypt filesystems ...) ``` Generate initramfs images @@ -422,8 +421,8 @@ chmod -c 0400 /etc/doas.conf 2. Add the following ```diff -+ permit artix as root -+ permit nopass artix as root cmd pacman ++permit artix as root ++permit nopass artix as root cmd pacman ``` --- @@ -479,11 +478,10 @@ blkid -s UUID -o value /dev/nvme0n1p2 > GRUB_ENABLE_CRYPTODISK=y > ``` -```diff +```diff showLineNumbers=false del="#" ins="cryptdevice=UUID=xxxx:root root=/dev/mapper/root" -+ GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=xxxx:root root=/dev/mapper/root" ... -+ GRUB_ENABLE_CRYPTODISK=y -- #GRUB_ENABLE_CRYPTODISK=y +GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=xxxx:root root=/dev/mapper/root" +#GRUB_ENABLE_CRYPTODISK=y ``` 6. Generate the config file @@ -525,35 +523,24 @@ doas sh -c "curl https://archlinux.org/mirrorlist/all -o /etc/pacman.d/mirrorlis 2. Activate Arch mirrors -> [!note] -> This file requires root permissions to edit - -```diff +```diff del="#" -## Worldwide -- #Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch -- #Server = https://ftpmirror.infania.net/mirror/archlinux/$repo/os/$arch -- #Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch -- #Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch -+ Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch -+ Server = https://ftpmirror.infania.net/mirror/archlinux/$repo/os/$arch -+ Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch -+ Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch +#Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch +#Server = https://ftpmirror.infania.net/mirror/archlinux/$repo/os/$arch +#Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch +#Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch ``` 3. Edit the pacman config file -> [!note] -> This file requires root permissions to edit - -```ini +```diff -##Arch -[extra] -Include = /etc/pacman.d/mirrorlist-arch ++##Arch ++[extra] ++Include = /etc/pacman.d/mirrorlist-arch -##[multilib] -##Include = /etc/pacman.d/mirrorlist-arch ++##[multilib] ++##Include = /etc/pacman.d/mirrorlist-arch ``` #### Sort for fastest mirrors @@ -566,15 +553,25 @@ doas sh -c "rankmirrors -v -n 5 /etc/pacman.d/mirrorlist.bak > /etc/pacman.d/mir ``` ### AUR +#### Add Chaotic-AUR +```sh +doas pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com +doas pacman-key --lsign-key 3056513887B78AEB +doas pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' +doas pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst' +``` + +```diff showLineNumbers=false + ++[chaotic-aur] ++Include = /etc/pacman.d/chaotic-mirrorlist +``` + #### Install paru ```sh -doas pacman -S --needed base-devel -git clone https://aur.archlinux.org/paru.git -cd paru -makepkg -si -cd .. -rm -rf paru +doas pacman -Syu +doas pacman -S paru ``` #### Replace sudo with doas @@ -608,6 +605,7 @@ echo '/swapfile none swap sw 0 0' | doas tee -a /etc/fstab ### Auto-mount an external LUKS encrypted drive ```sh +doas pacman -S cryptsetup-openrc fdisk doas fdisk /dev/sdb >g, n, w @@ -621,14 +619,17 @@ doas dd if=/dev/urandom of=/root/keyfile_hdd1 bs=512 count=4 doas chmod 0400 /root/keyfile_hdd1 doas cryptsetup luksAddKey /dev/sdb1 /root/keyfile_hdd1 UUID=$(doas blkid -s UUID -o value /dev/sdb1) +``` -doas sh -c "cat << EOF >> /etc/conf.d/dmcrypt -target=hdd1 -source=UUID='$UUID' -key=/root/keyfile_hdd1 -wait=2 -EOF" +```diff showLineNumbers=false + ++target=hdd1 ++source=UUID='$UUID' ++key=/root/keyfile_hdd1 ++wait=2 +``` +```sh doas rc-update add dmcrypt boot doas reboot -``` \ No newline at end of file +``` \ No newline at end of file