From ca792049f0d87947362f111897a4dab7acc61543 Mon Sep 17 00:00:00 2001 From: The_miro Date: Tue, 12 May 2026 14:52:01 +0200 Subject: [PATCH] archiso: clone dotfiles into /etc/skel and add XDG user dirs Populate /etc/skel with the Dotfiles repo and standard XDG directories (Desktop, Documents, Downloads, Music, Pictures, Public, Templates, Videos) before useradd -m, so the new user's home is fully set up at creation time. Co-Authored-By: Claude Sonnet 4.6 --- setup/archbaseos-guided-install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setup/archbaseos-guided-install.sh b/setup/archbaseos-guided-install.sh index 757a6e4..b12ea4f 100755 --- a/setup/archbaseos-guided-install.sh +++ b/setup/archbaseos-guided-install.sh @@ -163,8 +163,16 @@ hwclock --systohc echo "$HOSTNAME" > /etc/hostname systemctl enable NetworkManager +# Populate /etc/skel before user creation so useradd -m copies everything +echo "Cloning dotfiles into /etc/skel..." +git clone https://git.abdelbaki.eu/The_miro/Dotfiles.git /etc/skel/Dotfiles \ + || echo "Warning: dotfiles clone failed — clone manually after first boot." + +mkdir -p /etc/skel/{Desktop,Documents,Downloads,Music,Pictures,Public,Templates,Videos} + useradd -m -G wheel -s /bin/zsh "$USERNAME" echo "$USERNAME:$USERPASS" | chpasswd +chown -R "$USERNAME:$USERNAME" "/home/$USERNAME" echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers @@ -197,10 +205,6 @@ if [[ "$ENABLE_FIDO_USER" == "YES" ]]; then echo "auth required pam_u2f.so" >> /etc/pam.d/system-auth fi -echo "Cloning dotfiles..." -git clone https://git.abdelbaki.eu/The_miro/Dotfiles.git /home/$USERNAME/Dotfiles \ - && chown -R $USERNAME:$USERNAME /home/$USERNAME/Dotfiles \ - || echo "Warning: dotfiles clone failed — clone manually after first boot." EOF