git » mk-desktop-image.git » main » tree

[main] / initial.sh

#!/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)

# Ignore any packages trying to overidde preconfigured stuff
# Currently only pacman.conf, lol.
cd /etc
find -name '*.pacnew' -delete
cd /

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

#depmod the one kernel
cd /usr/lib/modules
depmod *-ALFS

# iotop as non-root
setcap 'cap_net_admin+eip' /usr/bin/iotop

# somehow, these can get fubbled up
chown root:messagebus /usr/libexec/dbus-daemon-launch-helper
chmod 4754 /usr/libexec/dbus-daemon-launch-helper

# 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 default armlfs user
useradd -U -G users,video,render,audio,wheel -u 1000 -m armlfs
passwd -d armlfs

# Make the greeter default to the correct session
mkdir -p /var/cache/regreet
cat > /var/cache/regreet/cache.toml << "EOF"
last_user = "armlfs"

[user_to_last_sess]
armlfs = "Plasma (Wayland)"
EOF
chown -R greeter:greeter /var/cache/regreet

# gimme a mo
#echo "manual config?"
#bash