#+title: PWL Arch Linux Config * Prerequisites - Completed Arch Linux Installation - partitioning - encryption - main user - Network Connection * Literate File Headers ** update.sh #+begin_src shell :tangle update.sh #!/bin/sh # DO NOT EDIT THIS FILE DIRECTLY # This is a file generated from a literate programing source file # You should make any changes there and regenerate it from Emacs org-mode # using org-babel-tangle (C-c C-v t) #+end_src ** packages.txt #+begin_src shell :tangle pkg-list.txt # DO NOT EDIT THIS FILE DIRECTLY # This is a file generated from a literate programing source file # You should make any changes there and regenerate it from Emacs org-mode # using org-babel-tangle (C-c C-v t) #+end_src * Package Management ** Arch and AUR Packages *** Package Manager General Package Management is done via [[https://github.com/Jguer/yay][Yay]]. ~update.sh~ will install it if needed. #+begin_src shell :tangle update.sh if ! command -v yay &> /dev/null then echo "Installing Yay ..." pacman -S --needed git base-devel git clone https://aur.archlinux.org/yay.git cd yay makepkg -si fi #+end_src *** Package Installation remove all packages not in ~pkg-list.txt~ #+begin_src shell :tangle update.sh # Get list of installed packages INSTALLED_PACKAGES=$(yay -Qqe) # Read the list of packages to keep from the file KEEP_LIST=$(cat "pkg-list.txt") # Loop through installed packages for PACKAGE in $INSTALLED_PACKAGES; do # Check if the package is not in the keep list if ! echo "$KEEP_LIST" | grep -q "^$PACKAGE$"; then echo "Removing package: $PACKAGE" # Uncomment the following line to actually remove the package yay -Rns --noconfirm "$PACKAGE" fi done #+end_src and install the packages specified in ~pkg-list.txt~ #+begin_src shell :tangle update.sh yay -S --needed `grep -v '^#' pkg-list.txt` #+end_src * Base System ** Arch Linux the following packages are required for basic operation and should never be deleted #+begin_src shell :tangle pkg-list.txt amd-ucode base efibootmgr grub linux-zen linux-lts linux-firmware lvm2 sudo #+end_src ** Networking This config uses the [[https://wiki.archlinux.org/title/NetworkManager][NetworkManager]] #+begin_src shell :tangle pkg-list.txt networkmanager #+end_src after being installed it also needs to be enabled #+begin_src shell :tangle update.sh systemd_service="NetworkManager" if ! systemctl is-enabled --quiet "$systemd_service"; then echo "Enabling $systemd_service" sudo systemctl enable "$systemd_service" sudo systemctl start "$systemd_service" fi #+end_src ** [[https://wiki.archlinux.org/title/Man_page][Man Pages]] and [[https://wiki.archlinux.org/title/GNU#Texinfo][Texinfo]] #+begin_src shell :tangle pkg-list.txt man-db man-pages texinfo #+end_src