mirror of
https://github.com/theupriser/steamify-cachyos-dev.git
synced 2026-10-05 12:45:56 +02:00
feat: vminstall.sh installs any boot loader and the Steamify ISO's Steamify step, with a package cache
VM_BOOTLOADER=limine|systemd-boot|grub, VM_STEAMIFY (steamify-install runs after the headless installer, like Calamares does), VM_CACHE (host pacman cache shared as 9p, default ~/vms/pkg-cache). run.sh --headless / VM_HEADLESS=1: no window. Fixes found on the way: the live script deadlocked on is-system-running (it is the running kernel-command-line.service) and now waits for pacman-init; the post script kept forcing the Plasma login over Steamify's gaming-mode SDDM, gave systemd-boot no timeout/default (it waited in the menu for ever), and left ufw blocking the host's ssh; the first-boot check wanted plasmashell in gaming mode.
This commit is contained in:
1 parent
fa776b1761
commit
8646b3c30a
4 files changed
+87
-15
No files matched your search
+25
-5
@@ -23,11 +23,18 @@ chmod 440 /etc/sudoers.d/99-test-vm
|
||||
|
||||
# Log straight into Plasma (gamescope doesn't render in the VM). The
|
||||
# scripts expect plasma-login-manager, like a CachyOS install from Calamares.
|
||||
pacman -Q plasma-login-manager >/dev/null 2>&1 || pacman -S --needed --noconfirm plasma-login-manager
|
||||
systemctl disable sddm.service 2>/dev/null || true
|
||||
systemctl enable plasmalogin.service
|
||||
mkdir -p /etc/plasmalogin.conf.d
|
||||
printf '[Autologin]\nUser=%s\nSession=plasma.desktop\n' "$VM_USER" > /etc/plasmalogin.conf.d/00-test-autologin.conf
|
||||
# Not when Steamify's conversion is on (steamify-install ran on a Steamify
|
||||
# ISO): it made SDDM boot into gamescope, and that is what gets tested; sshd
|
||||
# doesn't need a desktop.
|
||||
if [[ -f /etc/sddm.conf.d/10-gamescope-autologin.conf ]]; then
|
||||
echo "Steamify's gaming-mode login (SDDM) kept."
|
||||
else
|
||||
pacman -Q plasma-login-manager >/dev/null 2>&1 || pacman -S --needed --noconfirm plasma-login-manager
|
||||
systemctl disable sddm.service 2>/dev/null || true
|
||||
systemctl enable plasmalogin.service
|
||||
mkdir -p /etc/plasmalogin.conf.d
|
||||
printf '[Autologin]\nUser=%s\nSession=plasma.desktop\n' "$VM_USER" > /etc/plasmalogin.conf.d/00-test-autologin.conf
|
||||
fi
|
||||
|
||||
# cachyos-installer's limine.conf has no default_entry: entry 1 is the
|
||||
# "CachyOS" folder, so the first boot waits in the menu. 2 is its first
|
||||
@@ -36,6 +43,19 @@ if [[ -f /boot/limine.conf ]] && ! grep -q '^default_entry:' /boot/limine.conf;
|
||||
sed -i 's/^timeout: .*/&\ndefault_entry: 2/' /boot/limine.conf
|
||||
fi
|
||||
|
||||
# cachyos-installer's systemd-boot loader.conf has `#timeout 3` commented out and
|
||||
# no default: the first boot would wait in the menu for ever. Boot the first
|
||||
# kernel after 3 s.
|
||||
if [[ -f /boot/loader/loader.conf ]] && ! grep -q '^timeout' /boot/loader/loader.conf; then
|
||||
printf 'timeout 3\ndefault linux-cachyos.conf\n' >> /boot/loader/loader.conf
|
||||
fi
|
||||
|
||||
# The installer enables ufw, which drops the host's ssh connections (found
|
||||
# in the kernel log: [UFW BLOCK] DPT=22). Let ssh in; the rest stays as installed.
|
||||
if command -v ufw >/dev/null; then
|
||||
ufw allow 22/tcp || echo "(ufw rule failed: ssh may be blocked)"
|
||||
fi
|
||||
|
||||
# English everywhere, whatever the live ISO picked.
|
||||
echo 'LANG=en_US.UTF-8' > /etc/locale.conf
|
||||
|
||||
|
||||
Reference in new issue
Block a user