diff --git a/build.zsh b/build.zsh index 299aa16..afd64d4 100755 --- a/build.zsh +++ b/build.zsh @@ -47,8 +47,8 @@ sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/var/lib/machines/arch/etc/pacman.c arch-chroot root.x86_64/var/lib/machines/arch /bin/sh -c 'pacman-key --init' arch-chroot root.x86_64/var/lib/machines/arch /bin/sh -c 'pacman-key --populate archlinux' -# Install base packages -arch-chroot root.x86_64/var/lib/machines/arch /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs npm docker podman bc sqlite' +# Install base packages (including systemd-container for machinectl) +arch-chroot root.x86_64/var/lib/machines/arch /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs npm docker podman bc sqlite systemd arch-install-scripts' # Configure containers arch-chroot root.x86_64/var/lib/machines/arch /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d' diff --git a/cfg/setup-user.sh b/cfg/setup-user.sh index db8b69b..bf22c8e 100755 --- a/cfg/setup-user.sh +++ b/cfg/setup-user.sh @@ -11,6 +11,25 @@ echo "Creating user 'ai'..." arch-chroot $ROOTFS /bin/sh -c 'useradd -m -G wheel -s /bin/zsh ai' arch-chroot $ROOTFS /bin/sh -c 'echo "ai:root" | chpasswd' +# Configure securetty for pts login (required for systemd-nspawn) +echo "Configuring securetty..." +cat >> $ROOTFS/etc/securetty <<'EOF' +pts/0 +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 +pts/7 +pts/8 +pts/9 +EOF + +# Enable systemd-machined for container management +echo "Enabling systemd-machined..." +arch-chroot $ROOTFS /bin/sh -c 'systemctl enable systemd-machined' + # Setup auto-login for user 'ai' echo "Setting up auto-login..." arch-chroot $ROOTFS /bin/sh -c 'mkdir -p /etc/systemd/system/getty@tty1.service.d'