KAMOS: bootc-install fix, KDE wallpaper config, Plymouth theme activation

This commit is contained in:
mkm1971 2026-05-10 13:14:29 +04:00
parent 42998d3510
commit d931bc0418
4 changed files with 126 additions and 58 deletions

View File

@ -35,6 +35,12 @@ LABEL io.artifacthub.package.readme-url="https://cgi.medsys.cloud/mkm1971/kamos/
COPY build_files/ /ctx/
COPY system_files/ /
# bootc install config - tells bootc-image-builder our rootfs is btrfs.
# Without a file under /usr/lib/bootc/install/, bib errors out with
# "missing required info: DefaultRootfs". 00- prefix loads first; any
# upstream Bazzite file with a higher prefix can still override.
COPY build_files/bootc-install.toml /usr/lib/bootc/install/00-kamos.toml
# -----------------------------------------------------------------------------
# Stage 2: run the customisation script
# - install / remove packages

View File

@ -0,0 +1,2 @@
[install]
root-fs-type = "btrfs"

View File

@ -1,27 +1,15 @@
#!/usr/bin/env bash
# =============================================================================
# build.sh - runs INSIDE the container during `podman build`
#
# Anything you'd normally `dnf install`, `systemctl enable`, or drop in
# /etc or /usr goes here. Run as root, on Fedora bootc.
# KAMOS Gaming OS - based on Bazzite-NVIDIA
# =============================================================================
set -euxo pipefail
# -----------------------------------------------------------------------------
# 1. Install extra packages
# Bazzite already ships a LOT - check `rpm -qa` on the base before adding.
# Anything you uncomment below will be layered on top.
# -----------------------------------------------------------------------------
EXTRA_PACKAGES=(
# CLI niceties
# htop
# bat
# ripgrep
# fastfetch
# Dev tooling
# gh
# tmux
# Add packages here later if you want
)
if [ ${#EXTRA_PACKAGES[@]} -gt 0 ]; then
@ -29,12 +17,10 @@ if [ ${#EXTRA_PACKAGES[@]} -gt 0 ]; then
fi
# -----------------------------------------------------------------------------
# 2. Remove packages you don't want
# Use `dnf -y remove --no-autoremove` so you don't accidentally pull
# half the desktop with you.
# 2. Remove packages
# -----------------------------------------------------------------------------
REMOVE_PACKAGES=(
# firefox
# Add packages to remove here later
)
if [ ${#REMOVE_PACKAGES[@]} -gt 0 ]; then
@ -42,10 +28,10 @@ if [ ${#REMOVE_PACKAGES[@]} -gt 0 ]; then
fi
# -----------------------------------------------------------------------------
# 3. Enable systemd units (system-wide)
# 3. Enable systemd units
# -----------------------------------------------------------------------------
SERVICES_ENABLE=(
# podman.socket
# Add services here later
)
for svc in "${SERVICES_ENABLE[@]}"; do
@ -53,9 +39,7 @@ for svc in "${SERVICES_ENABLE[@]}"; do
done
# -----------------------------------------------------------------------------
# 4. KAMOS branding - OS release name shown in `neofetch`, login screen, etc.
# The base bazzite-nvidia overrides /etc/os-release; we patch the
# customisable fields without breaking version detection.
# 4. KAMOS branding - OS release name
# -----------------------------------------------------------------------------
KAMOS_OS_NAME="KAMOS Gaming OS"
KAMOS_TAGLINE="Play. Perform. Dominate."
@ -72,14 +56,12 @@ if [ -f /usr/lib/os-release ]; then
fi
# -----------------------------------------------------------------------------
# 5. KAMOS wallpaper
# File: system_files/usr/share/backgrounds/kamos/kamos-wallpaper.jpg
# Sets a system-wide default for all new users via a dconf override.
# 5. KAMOS wallpaper - GNOME (dconf)
# -----------------------------------------------------------------------------
KAMOS_WALLPAPER="/usr/share/backgrounds/kamos/kamos-wallpaper.jpg"
if [ -f "${KAMOS_WALLPAPER}" ]; then
echo "==> Applying KAMOS wallpaper"
echo "==> Applying KAMOS GNOME wallpaper"
mkdir -p /etc/dconf/db/local.d /etc/dconf/profile
cat > /etc/dconf/profile/user <<'EOF'
user-db:user
@ -101,44 +83,90 @@ EOF
fi
# -----------------------------------------------------------------------------
# 6. KAMOS Plymouth boot splash
# Files (provided by us in system_files/):
# /usr/share/plymouth/themes/kamos/kamos.plymouth
# /usr/share/plymouth/themes/kamos/kamos.script
# /usr/share/plymouth/themes/kamos/kamos-logo.png
#
# The kamos theme uses ModuleName=script which needs the
# plymouth-plugin-script package - Bazzite doesn't ship it by default.
# 5b. KAMOS wallpaper - KDE Plasma (uses /etc/skel for new users)
# -----------------------------------------------------------------------------
if [ -f /usr/share/plymouth/themes/kamos/kamos.plymouth ]; then
echo "==> Installing plymouth script plugin"
if dnf -y install plymouth-plugin-script; then
echo "==> Setting KAMOS as default plymouth theme"
plymouth-set-default-theme kamos
# Rebuild the initramfs so the splash is actually used at next boot.
if command -v dracut >/dev/null 2>&1; then
echo "==> Regenerating initramfs (dracut)"
dracut --force --regenerate-all || true
fi
else
echo "!! plymouth-plugin-script unavailable, leaving default Bazzite theme"
fi
if [ -f "${KAMOS_WALLPAPER}" ]; then
echo "==> Applying KAMOS KDE Plasma wallpaper defaults"
mkdir -p /etc/skel/.config
cat > /etc/skel/.config/plasma-org.kde.plasma.desktop-appletsrc <<EOF
[Containments][1]
ItemGeometriesHorizontal=
activityId=
formfactor=2
immutability=1
lastScreen=0
location=0
plugin=org.kde.plasma.folder
wallpaperplugin=org.kde.image
[Containments][1][Wallpaper][org.kde.image][General]
Image=file://${KAMOS_WALLPAPER}
PreviewImage=file://${KAMOS_WALLPAPER}
EOF
# Register KAMOS as a KDE wallpaper package (so it appears in wallpaper picker)
mkdir -p /usr/share/wallpapers/Kamos/contents/images
cp -f "${KAMOS_WALLPAPER}" /usr/share/wallpapers/Kamos/contents/images/default.jpg || true
cat > /usr/share/wallpapers/Kamos/metadata.json <<'EOF'
{
"KPlugin": {
"Id": "Kamos",
"Name": "KAMOS"
},
"X-KDE-PluginInfo-Author": "mkm1971",
"X-KDE-PluginInfo-License": "Apache-2.0",
"X-KDE-PluginInfo-Name": "Kamos"
}
EOF
fi
# -----------------------------------------------------------------------------
# 7. KAMOS GRUB logo
# Bazzite ships its own GRUB theme; we replace the logo asset only.
# File: system_files/usr/share/pixmaps/kamos-logo.png (24-bit, ~256x256)
# 6. KAMOS Plymouth boot splash
# -----------------------------------------------------------------------------
echo "==> Plymouth theme setup"
if [ -d /usr/share/plymouth/themes/kamos ]; then
echo "==> KAMOS theme directory exists, contents:"
ls -la /usr/share/plymouth/themes/kamos/
if [ -f /usr/share/plymouth/themes/kamos/kamos.plymouth ]; then
echo "==> kamos.plymouth file present, attempting to install script plugin"
if dnf -y install plymouth-plugin-script 2>/dev/null; then
echo "==> plymouth-plugin-script installed"
else
echo "==> plymouth-plugin-script unavailable; trying without it"
fi
echo "==> Setting KAMOS as default plymouth theme"
if plymouth-set-default-theme kamos 2>&1; then
echo "==> SUCCESS: theme set to kamos"
if command -v dracut >/dev/null 2>&1; then
echo "==> Regenerating initramfs (dracut)"
dracut --force --regenerate-all || true
fi
else
echo "==> FAILED to set kamos theme"
fi
else
echo "==> kamos.plymouth file MISSING - theme directory exists but is empty"
fi
else
echo "==> WARN: /usr/share/plymouth/themes/kamos/ does not exist"
fi
# -----------------------------------------------------------------------------
# 7. KAMOS GRUB logo (only if GRUB themes exist - Bazzite uses systemd-boot)
# -----------------------------------------------------------------------------
KAMOS_LOGO="/usr/share/pixmaps/kamos-logo.png"
if [ -f "${KAMOS_LOGO}" ]; then
echo "==> KAMOS logo present at ${KAMOS_LOGO}"
# If a Bazzite GRUB theme exists, drop the logo into it for the boot menu.
for theme_dir in /usr/share/grub/themes/*/; do
if [ -d "${theme_dir}" ]; then
cp -f "${KAMOS_LOGO}" "${theme_dir}/logo.png" || true
fi
done
if [ -d /usr/share/grub/themes ]; then
for theme_dir in /usr/share/grub/themes/*/; do
if [ -d "${theme_dir}" ]; then
cp -f "${KAMOS_LOGO}" "${theme_dir}/logo.png" || true
fi
done
fi
fi
# -----------------------------------------------------------------------------
@ -148,4 +176,4 @@ dnf clean all
rm -rf /tmp/* /var/* || true
mkdir -p /var/log /var/cache /var/tmp
echo "==> build.sh finished cleanly"
echo "==> build.sh finished cleanly"

32
disk_config/iso.toml.bak Normal file
View File

@ -0,0 +1,32 @@
# KAMOS Gaming OS - bootc-image-builder ISO config
# Used by `just build-iso` and the build-disk workflow.
# Reference: https://osbuild.org/docs/bootc/
[customizations]
hostname = "kamos"
[[customizations.user]]
name = "khalaf"
password = "changeme"
groups = ["wheel"]
[customizations.kernel]
# NVIDIA proprietary driver works best with the modules baked into Bazzite's
# kernel. `splash` enables Plymouth so the KAMOS boot splash actually shows.
# Don't add nomodeset unless you've fallen back to a recovery scenario.
append = "rhgb quiet splash"
[customizations.locale]
languages = ["en_US.UTF-8"]
keyboard = "us"
[customizations.timezone]
timezone = "UTC"
[[customizations.filesystem]]
mountpoint = "/"
minsize = "10 GiB"
[[customizations.filesystem]]
mountpoint = "/var"
minsize = "20 GiB"