#!/bin/bash
ldconfig -r .
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen
export LANG="en_US.UTF-8"
# install all the packages
pacman -S $(cat ./pkglist.txt)
systemctl preset-all
make-ca -r
systemd-sysusers
setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx var/log/journal/ 2>/dev/null
# enable some services by default, but don't track them
systemctl enable \
getty@tty1.service \
remote-fs.target
mkdir -m2755 var/log/journal/remote
chgrp systemd-journal-remote var/log/journal/remote
# Dont care if i get rid of these forgotten users from the fs package lol
userdel tester 2>/dev/null || true
userdel builder 2>/dev/null || true
# Add the builder user
useradd -U -G users,wheel -u 2000 -m builder
# The root user could use the skel files, too.
cp /etc/skel/.bash* /root/
echo "export VISUAL=nano" >> /root/.bashrc
# Null out the passwords
passwd -d root
passwd -d builder
# debuginfod server
systemctl enable debuginfod.service
useradd -U -r debuginfod
# The /sources directory
mkdir -p /sources
mkdir -p /sources/archives/{core,base,kde5}
chown -R builder:builder /sources
chmod 1777 /sources