Files
stormux/x86_64/airootfs/root/customize_airootfs.sh
2025-11-29 03:54:28 -05:00

52 lines
1.4 KiB
Bash

#!/usr/bin/env bash
#
# Archiso airootfs customization script
# This runs in the airootfs chroot during ISO build
set -e -u
# Initialize pacman keyring
echo "Initializing pacman keyring..."
pacman-key --init
pacman-key --populate archlinux
# Add Stormux repository key
echo "Adding Stormux repository key..."
if [ -f /root/stormux_repo.pub ]; then
pacman-key --add /root/stormux_repo.pub
pacman-key --lsign-key 52ADA49000F1FF0456F8AEEFB4CDE1CD56EF8E82
echo "Stormux repository key added and locally signed"
rm /root/stormux_repo.pub
else
echo "Warning: Stormux repository key not found at /root/stormux_repo.pub"
fi
# Set locale
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
locale-gen
# Enable system services
systemctl enable NetworkManager.service
systemctl enable fenrirscreenreader.service
systemctl enable brltty.path
# Enable user services globally for all users
systemctl --global enable pipewire.service pipewire-pulse.service
# Set permissions for stormux user home
if [ -d /home/stormux ]; then
chown -R 1000:1000 /home/stormux
fi
# Copy Stormux custom skel files to /etc/skel
# This is done after package installation to avoid conflicts with packages like screen
echo "Copying Stormux custom skel files..."
if [ -d /etc/skel.stormux ]; then
cp -a /etc/skel.stormux/. /etc/skel/
echo "Stormux skel files copied to /etc/skel"
else
echo "Warning: /etc/skel.stormux not found"
fi
echo "Airootfs customization complete"