KAMOS: bootc-install fix, KDE wallpaper config, Plymouth theme activation
This commit is contained in:
parent
42998d3510
commit
d931bc0418
|
|
@ -35,6 +35,12 @@ LABEL io.artifacthub.package.readme-url="https://cgi.medsys.cloud/mkm1971/kamos/
|
||||||
COPY build_files/ /ctx/
|
COPY build_files/ /ctx/
|
||||||
COPY system_files/ /
|
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
|
# Stage 2: run the customisation script
|
||||||
# - install / remove packages
|
# - install / remove packages
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
[install]
|
||||||
|
root-fs-type = "btrfs"
|
||||||
|
|
@ -1,27 +1,15 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# build.sh - runs INSIDE the container during `podman build`
|
# build.sh - runs INSIDE the container during `podman build`
|
||||||
#
|
# KAMOS Gaming OS - based on Bazzite-NVIDIA
|
||||||
# Anything you'd normally `dnf install`, `systemctl enable`, or drop in
|
|
||||||
# /etc or /usr goes here. Run as root, on Fedora bootc.
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# 1. Install extra packages
|
# 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=(
|
EXTRA_PACKAGES=(
|
||||||
# CLI niceties
|
# Add packages here later if you want
|
||||||
# htop
|
|
||||||
# bat
|
|
||||||
# ripgrep
|
|
||||||
# fastfetch
|
|
||||||
|
|
||||||
# Dev tooling
|
|
||||||
# gh
|
|
||||||
# tmux
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if [ ${#EXTRA_PACKAGES[@]} -gt 0 ]; then
|
if [ ${#EXTRA_PACKAGES[@]} -gt 0 ]; then
|
||||||
|
|
@ -29,12 +17,10 @@ if [ ${#EXTRA_PACKAGES[@]} -gt 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# 2. Remove packages you don't want
|
# 2. Remove packages
|
||||||
# Use `dnf -y remove --no-autoremove` so you don't accidentally pull
|
|
||||||
# half the desktop with you.
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
REMOVE_PACKAGES=(
|
REMOVE_PACKAGES=(
|
||||||
# firefox
|
# Add packages to remove here later
|
||||||
)
|
)
|
||||||
|
|
||||||
if [ ${#REMOVE_PACKAGES[@]} -gt 0 ]; then
|
if [ ${#REMOVE_PACKAGES[@]} -gt 0 ]; then
|
||||||
|
|
@ -42,10 +28,10 @@ if [ ${#REMOVE_PACKAGES[@]} -gt 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# 3. Enable systemd units (system-wide)
|
# 3. Enable systemd units
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
SERVICES_ENABLE=(
|
SERVICES_ENABLE=(
|
||||||
# podman.socket
|
# Add services here later
|
||||||
)
|
)
|
||||||
|
|
||||||
for svc in "${SERVICES_ENABLE[@]}"; do
|
for svc in "${SERVICES_ENABLE[@]}"; do
|
||||||
|
|
@ -53,9 +39,7 @@ for svc in "${SERVICES_ENABLE[@]}"; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# 4. KAMOS branding - OS release name shown in `neofetch`, login screen, etc.
|
# 4. KAMOS branding - OS release name
|
||||||
# The base bazzite-nvidia overrides /etc/os-release; we patch the
|
|
||||||
# customisable fields without breaking version detection.
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
KAMOS_OS_NAME="KAMOS Gaming OS"
|
KAMOS_OS_NAME="KAMOS Gaming OS"
|
||||||
KAMOS_TAGLINE="Play. Perform. Dominate."
|
KAMOS_TAGLINE="Play. Perform. Dominate."
|
||||||
|
|
@ -72,14 +56,12 @@ if [ -f /usr/lib/os-release ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# 5. KAMOS wallpaper
|
# 5. KAMOS wallpaper - GNOME (dconf)
|
||||||
# File: system_files/usr/share/backgrounds/kamos/kamos-wallpaper.jpg
|
|
||||||
# Sets a system-wide default for all new users via a dconf override.
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
KAMOS_WALLPAPER="/usr/share/backgrounds/kamos/kamos-wallpaper.jpg"
|
KAMOS_WALLPAPER="/usr/share/backgrounds/kamos/kamos-wallpaper.jpg"
|
||||||
|
|
||||||
if [ -f "${KAMOS_WALLPAPER}" ]; then
|
if [ -f "${KAMOS_WALLPAPER}" ]; then
|
||||||
echo "==> Applying KAMOS wallpaper"
|
echo "==> Applying KAMOS GNOME wallpaper"
|
||||||
mkdir -p /etc/dconf/db/local.d /etc/dconf/profile
|
mkdir -p /etc/dconf/db/local.d /etc/dconf/profile
|
||||||
cat > /etc/dconf/profile/user <<'EOF'
|
cat > /etc/dconf/profile/user <<'EOF'
|
||||||
user-db:user
|
user-db:user
|
||||||
|
|
@ -101,44 +83,90 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# 6. KAMOS Plymouth boot splash
|
# 5b. KAMOS wallpaper - KDE Plasma (uses /etc/skel for new users)
|
||||||
# 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.
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
if [ -f /usr/share/plymouth/themes/kamos/kamos.plymouth ]; then
|
if [ -f "${KAMOS_WALLPAPER}" ]; then
|
||||||
echo "==> Installing plymouth script plugin"
|
echo "==> Applying KAMOS KDE Plasma wallpaper defaults"
|
||||||
if dnf -y install plymouth-plugin-script; then
|
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
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# 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"
|
echo "==> Setting KAMOS as default plymouth theme"
|
||||||
plymouth-set-default-theme kamos
|
if plymouth-set-default-theme kamos 2>&1; then
|
||||||
# Rebuild the initramfs so the splash is actually used at next boot.
|
echo "==> SUCCESS: theme set to kamos"
|
||||||
if command -v dracut >/dev/null 2>&1; then
|
if command -v dracut >/dev/null 2>&1; then
|
||||||
echo "==> Regenerating initramfs (dracut)"
|
echo "==> Regenerating initramfs (dracut)"
|
||||||
dracut --force --regenerate-all || true
|
dracut --force --regenerate-all || true
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "!! plymouth-plugin-script unavailable, leaving default Bazzite theme"
|
echo "==> FAILED to set kamos theme"
|
||||||
fi
|
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
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# 7. KAMOS GRUB logo
|
# 7. KAMOS GRUB logo (only if GRUB themes exist - Bazzite uses systemd-boot)
|
||||||
# Bazzite ships its own GRUB theme; we replace the logo asset only.
|
|
||||||
# File: system_files/usr/share/pixmaps/kamos-logo.png (24-bit, ~256x256)
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
KAMOS_LOGO="/usr/share/pixmaps/kamos-logo.png"
|
KAMOS_LOGO="/usr/share/pixmaps/kamos-logo.png"
|
||||||
if [ -f "${KAMOS_LOGO}" ]; then
|
if [ -f "${KAMOS_LOGO}" ]; then
|
||||||
echo "==> KAMOS logo present at ${KAMOS_LOGO}"
|
echo "==> KAMOS logo present at ${KAMOS_LOGO}"
|
||||||
# If a Bazzite GRUB theme exists, drop the logo into it for the boot menu.
|
if [ -d /usr/share/grub/themes ]; then
|
||||||
for theme_dir in /usr/share/grub/themes/*/; do
|
for theme_dir in /usr/share/grub/themes/*/; do
|
||||||
if [ -d "${theme_dir}" ]; then
|
if [ -d "${theme_dir}" ]; then
|
||||||
cp -f "${KAMOS_LOGO}" "${theme_dir}/logo.png" || true
|
cp -f "${KAMOS_LOGO}" "${theme_dir}/logo.png" || true
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
Loading…
Reference in New Issue