Files
.dotfiles/config.org
T
2024-02-11 00:40:36 +01:00

3.4 KiB

PWL Arch Linux Config

Prerequisites

  • Completed Arch Linux Installation

    • partitioning
    • encryption
    • main user

Literate File Headers

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)

packages.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)

Package Management

Arch and AUR Packages

Package Manager

General Package Management is done via Yay. update.sh will install it if needed.

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

Package Installation

remove all packages not in pkg-list.txt

# 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

and install the packages specified in pkg-list.txt

yay -S --needed `grep -v '^#' pkg-list.txt`

Base System

Arch Linux

the following packages are required for basic operation and should never be deleted

amd-ucode
base
efibootmgr
grub
linux-zen
linux-lts
linux-firmware
lvm2
sudo

Networking

This config uses the NetworkManager

networkmanager

after being installed it also needs to be enabled

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

Man Pages and Texinfo

man-db
man-pages
texinfo

Desktop Environments and Window Manager

LightDM

install the required packages

lightdm
lightdm-gtk-greeter

and enable the systemd service

systemd_service="lightdm"
if ! systemctl is-enabled --quiet "$systemd_service"; then
    echo "Enabling $systemd_service"
    sudo systemctl enable "$systemd_service"
fi

GNOME

GNOME is installed as a fallback in case the main Window Manager breaks

gnome