Install Arch

Reference

Before installing, do this on a different machine

Add arch to USB stick Add this file to another usb stick so you can copy pasta

lsblk
sudo umount /dev/flash_drive_here
# ext4 is linux compatibility only which good
sudo mkfs.ext4 /dev/flash_drive_here
sudo cp /home/piegarden/deploy/production/wiki-data/arch.md temp_folder/
sudo umount /dev/flash_drive_here

On arch machine mount the extra usb drive

lsblk
mkdir temp
mount /dev/flash_drive_here temp
vim temp/arch.md

During disk format make sure you set the boot disk to EFI type

# Delete all existing partitions with command: d
# All partitions should be GPT
fdisk /dev/nvme0n1
# n
# default
# +1GB
# Command: t
# Partition number: 1
# Partition type or alias: 1
# n
# default
# +4GB
# n
# default
# default
# Command: p
# verify:
#   Device            ... Type
#   /dev/nvme0n1p1    ... EFI System
#   /dev/nvme0n1p2    ... Linux filesystem
#   /dev/nvme0n1p3    ... Linux filesystem
# Command: w

# You can do it later when booted from that disk if you need to
sudo fdisk /dev/nvme0n1

Set font

setfont ter-132b

Bootstrap Critical Apps

pacstrap -K /mnt base linux linux-firmware amd-ucode networkmanager efibootmgr neovim fossil git openssh man-db man-pages sudo jq
mount --mkdir /dev/nvme0n1p1 /mnt/boot

list partition UUIDs

lsblk -f
export YOUR_ROOT_FILESYSTEM_UUID=<enter here>

bootloader

I chose this boot loader: https://wiki.archlinux.org/title/Systemd-boot

bootctl install
findmnt -no SOURCE,FSTYPE,OPTIONS /

# Find/record root UUID
lsblk -f
export YOUR_ROOT_FILESYSTEM_UUID=<enter here>

# Add bootloader entry
cat << EOF > /boot/loader/entries/arch.conf
title   Arch Linux
linux   /vmlinuz-linux
initrd  /amd-ucode.img
initrd  /initramfs-linux.img
options root=UUID=${YOUR_ROOT_FILESYSTEM_UUID} rw
EOF

Connect helper drive

mkdir -p /mnt/my_drive
mount --mkdir /dev/flash_drive_here /mnt/my_drive
arch-chroot /mnt

Create User

Reference

useradd -m piegarden
passwd
# sudo access from root user
usermod -aG wheel your_username
export EDITOR=nvim
visudo
# uncomment or the no password line beneath it if password for sudo is overkill for you
# %wheel ALL=(ALL:ALL) ALL

Setup NTP client

sudo systemctl enable systemd-timesyncd

Verify

# NPT is synced
timedatectl
# Expected:
#    System clock synchronized: yes
#    NTP service: active
#    RTC in local TZ: no

Setup Wifi

sudo systemctl enable NetworkManager
exit
reboot
# after boot: 
# ethernet
nmcli connection show
nmcli connection show --active
nmcli connection up "YOUR_CONNECTION_NAME"
sudo nmcli connection modify "YOUR_CONNECTION_NAME" ipv4.dns "1.1.1.1 8.8.8.8"
# wifi
nmcli device wifi list
nmcli device wifi connect "YOUR_SSID" --ask
nmcli -f NAME,AUTOCONNECT connection show

# refresh connection if needed
nmcli connection down "YOUR_CONNECTION_NAME"
nmcli connection up "YOUR_CONNECTION_NAME"

yay

su your_username

Reference

1password

Reference

SSH

mkdir -p .ssh
op item get 'ssh_home' --fields "private key" --format json | jq -r .value > .ssh/id_ed25519
chmod 700 .ssh
chmod 600 .ssh/id_ed25519 
sudo systemctl enable sshd
sudo systemctl start sshd
op item get 'ssh_home' --fields "public key" --format json | jq -r .value > .ssh/authorized_keys

Fossil

Using arch wiki recommendation to manage dotfiles with a minor tweak of using fossil instead. For work dotfiles that are the same like nvim I just sync them with syncthing one way sync.

cd museum/
fossil clone ssh://192.168.1.7:2222//home/piegarden/museum/create.fossil
rm -rf create
cd ~
fossil open ./museum/create.fossil --force
# note, do not use the above approach for managing work dotfiles. Use syncthing for those, but make the work computer readonly and do all changes on personal machine. Personal machine is secured by you, do not trust others.
    - personal: Send Only
    - optional always on server in-between: Send and Receive (personal won't receive changes sync it is send only and there shouldn't be any out of sync warnings if you make all changes from personal)
    - work: Receive Only
# using fossil at my home directory lets me manage my dotfiles easily. I can't use addremove anymore, but adding/removing one file at a time isn't so bad and probably a better practice anyway.

Choosing to live without

Create essential directories

mkdir ~/Downloads
mkdir ~/museum
mkdir ~/deploy
mkdir ~/deploy/production
  1. Install LVFS to update bios
    sudo pacman -S fwupd
    

Install Essential Apps

sudo pacman -S eza hyprland ripgrep syncthing alacritty curl wget neovide go lazygit git-delta tree-sitter-cli fd rsync
# hyprsunset helps reduce bluelight before bed: ~/.config/hypr/hyprsunset.conf
sudo pacman -S hyprsunset
# needed for creating a VFAT files system for raspberry pi. Binaries needed: mkfs.vfat mkfs.ext4
sudo pacman -S dosfstools
# Needed for signing pacman packages
sudo pacman -S gnupg
# Needed for things like updpkgsums for packaging with pacman
sudo pacman -Syu pacman-contrib
# Needed for managing packages
sudo pacman -S devtools nvchecker

Init private pacman repo client setup

Reference

Setup Autostart for Hyprland

Reference

# Ensure this is at the bottom of your ~/.bash_profile (it will block everything below it otherwise)
# Putting it in ~/.bash_profile so it only runs once and not on every new shell like ~/.bashrc does.
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
  exec start-hyprland
fi

# Linux/systemd
#     ↓
# getty on tty1
#     ↓
# login
#     ↓
# Bash (your configured login shell)
#     ↓
# reads ~/.bash_profile
#     ↓
# exec start-hyprland
#     ↓
# Bash is replaced by start-hyprland
#     ↓
# Hyprland

Syncthing

# Only run this if on a syncthing client or your bootstrapping without access to pacman alarm, friiday-syncthing comes with the relay and is installed together
systemctl --user enable --now syncthing.service

Codex CLI

# With umask 022, normal files are created 644 and directories 755.
# This lets the codex user read normal files but not modify them.
# SECRETS MUST BE 600, AND PRIVATE DIRECTORIES SHOULD BE 700.

# Codex gets its own home to freely experiment in
sudo useradd --create-home codex

# make home folder traversable and listable so codex isn't blocked when trying to navigate
setfacl -m u:codex:rx /home/piegarden

# let codex manage its own folder
sudo chown -R codex:codex ~/.codex

yay -S openai-codex-bin

Clipboard Provider needed so you can copy paste with + register

sudo pacman -S wl-clipboard slurp grim satty

slurp — lets you drag/select a region of the screen. grim — captures that region. satty — opens the captured image for annotation, cropping, drawing arrows/shapes, adding text, blurring/pixelating, etc. wl-clipboard (wl-copy, wl-paste) — can copy the final image to your Wayland clipboard.

Install Chromium

sudo pacman -S chromium
# Add vimium extension

Configure: Menu -> settings -> Appearance -> Mode -> Dark Menu -> settings -> Autofill and Passwords -> Password Manager -> Settings: Uncheck: Offer to save passwords and passkeys Uncheck: Sign in automatically Menu -> settings -> Privacy and Security -> Site Settings -> Notifications: Check: Don't Allow Sites to send notifications

For github contributions

sudo pacman -S github-cli

Install Notes App as pwa

Install xdg-open

So you can open links in neovim with gx

sudo pacman -S xdg-utils

Cross Compiler for Rust

Install Rust

# 1) Ensure rustup-managed toolchain is installed
sudo pacman -S rustup wasm-bindgen
# make rust default stable
rustup default stable

# 2) Add ARM64 Rust target to that toolchain
rustup target add --toolchain stable aarch64-unknown-linux-gnu

# 3) Cross C toolchain (needed by sqlite3-sys and other C deps)
sudo pacman -S --needed aarch64-linux-gnu-gcc

# 4) Verify
rustup target list --installed | rg aarch64-unknown-linux-gnu
rustup show active-toolchain
which cargo rustc rustup

Install Anki

sudo pacman -S anki
# Prompt selections:
# pipewire-jack
# qt6-multimedia-ffmpeg

Configure Tools -> Preferences -> Appearance -> Theme -> Dark

Use Tuta in the browser

You will want to check "Store Password" when logging in or even a page refresh will get you logged out

Remove temp helper files

# Ensure not in change-root
exit
umount /mnt/my_drive
rm -rf /mnt/my_drive

Remove programs

sudo pacman -Rsn package_name

Optional Install Firefox

Firefox has weird save prompt when you try to paste in notes app, this is the reason it is the alternate browser.

sudo pacman -S firefox firefoxpwa

# Prompt selections:
# pipewire-jack
# noto-fonts

Configure: Menu -> settings -> Home and Startup -> Homepage -> New Windows -> Blank Page -> New Tab -> Blank Page

Menu -> settings -> Appearance -> Dark

Optional install server programs

sudo pacman -S friiday-nginx

Lessons Learned

Omarchy

Reference

Problems with Omarchy

Good things about Omarchy

Vanilla Arch + hyprland