Skip to content

Instantly share code, notes, and snippets.

@jsmcnair
Last active February 22, 2024 22:48
Show Gist options
  • Save jsmcnair/060e209efffbcafab5e72974d0f88588 to your computer and use it in GitHub Desktop.
Save jsmcnair/060e209efffbcafab5e72974d0f88588 to your computer and use it in GitHub Desktop.
Arch Linux Setup
# As root
MAIN_USER=${MAIN_USER:?"Must set MAIN_USER env prior to running"}
GITHUB_USERNAME=${GITHUB_USERNAME:-"jsmcnair"}
TIMEZONE="Europe/London"
KEYS=${KEYS:-"uk"}
LOCALE=${LOCALE:"en_GB.UTF-8"}
### Localization
# Set the TZ
ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
# Set the locale
sed -i -E "s|^#($LOCALE)|\1|" /etc/locale.gen
locale-gen
echo "LANG=$LOCALE" > /etc/locale.conf
# Console keyboard
# ls /usr/share/kbd/keymaps/**/*.map.gz
loadkeys $KEYS
echo "KEYMAP=$KEYS" > /etc/vconsole.conf
# Console font
### Pacman
# pacman already initialised (https://gist.github.com/jsmcnair/f810f66dfe327411669ac5ad6f4ac42c)
# Refresh and upgrade packages
pacman -Syu
# Install some common packages / utils
pacman -S --needed --noconfirm \
git htop chezmoi zsh iwd
# Window manager
pacman -S --needed --noconfirm \
ttf-droid pipewire-jack wireplumber sway waybar swaylock
### User setup
# Sudo
pacman -S --needed --noconfirm sudo
echo "%wheel ALL=(ALL:ALL) ALL" > /etc/sudoers.d/sudo-group
# User
useradd --create-home --user-group --groups wheel,seat --shell /usr/bin/zsh $MAIN_USER
echo "Setting password for $MAIN_USER"
passwd $MAIN_USER
cd /home/$MAIN_USER
chezmoi init https://github.com/$GITHUB_USERNAME/dotfiles.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment