mirror of
https://github.com/tumillanino/miasma-os.git
synced 2026-04-11 07:15:31 +00:00
Compare commits
3 Commits
2fe52fc3c1
...
03bc0c3bba
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03bc0c3bba | ||
|
|
e00db9e3fa | ||
|
|
a78782e54d |
@@ -1,6 +1,14 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -oue pipefail
|
set -oue pipefail
|
||||||
|
|
||||||
|
# Fix boot entry title and OS identity
|
||||||
|
sed -i 's|^PRETTY_NAME=.*|PRETTY_NAME="Miasma OS"|' /usr/lib/os-release
|
||||||
|
sed -i 's|^NAME=.*|NAME="Miasma OS"|' /usr/lib/os-release
|
||||||
|
sed -i 's|^ID=.*|ID=miasma-os|' /usr/lib/os-release
|
||||||
|
sed -i 's|^ID_LIKE=.*|ID_LIKE=fedora|' /usr/lib/os-release
|
||||||
|
sed -i 's|^LOGO=.*|LOGO=distributor-logo|' /usr/lib/os-release
|
||||||
|
|
||||||
mv /tmp/files/assets/images/distributor-logo.svg /usr/share/icons/hicolor/scalable/places/distributor-logo.svg
|
mv /tmp/files/assets/images/distributor-logo.svg /usr/share/icons/hicolor/scalable/places/distributor-logo.svg
|
||||||
mv /tmp/files/assets/splash/default.jxl /usr/share/backgrounds/default.jxl
|
mv /tmp/files/assets/splash/default.jxl /usr/share/backgrounds/default.jxl
|
||||||
mv /tmp/files/assets/splash/default-dark.jxl /usr/share/backgrounds/default-dark.jxl
|
mv /tmp/files/assets/splash/default-dark.jxl /usr/share/backgrounds/default-dark.jxl
|
||||||
@@ -17,3 +25,16 @@ mv /tmp/files/assets/images/fedora_logo_med.png /usr/share/pixmaps/fedora_logo_m
|
|||||||
mv /tmp/files/assets/images/fedora_whitelogo.svg /usr/share/pixmaps/fedora_whitelogo.svg
|
mv /tmp/files/assets/images/fedora_whitelogo.svg /usr/share/pixmaps/fedora_whitelogo.svg
|
||||||
mv /tmp/files/assets/images/fedora_whitelogo_med.png /usr/share/pixmaps/fedora_whitelogo_med.png
|
mv /tmp/files/assets/images/fedora_whitelogo_med.png /usr/share/pixmaps/fedora_whitelogo_med.png
|
||||||
mv /tmp/files/assets/images/system-logo-white.png /usr/share/pixmaps/system-logo-white.png
|
mv /tmp/files/assets/images/system-logo-white.png /usr/share/pixmaps/system-logo-white.png
|
||||||
|
|
||||||
|
# Replace EFI boot picker icon (shown before SDDM) with Miasma OS logo
|
||||||
|
mkdir -p /usr/share/pixmaps/bootloader
|
||||||
|
python3 -c "
|
||||||
|
import struct
|
||||||
|
with open('/usr/share/pixmaps/system-logo-white.png', 'rb') as f:
|
||||||
|
png_data = f.read()
|
||||||
|
# ICNS format: embed PNG data directly using ic09 (512x512) slot
|
||||||
|
entry = b'ic09' + struct.pack('>I', 8 + len(png_data)) + png_data
|
||||||
|
icns = b'icns' + struct.pack('>I', 8 + len(entry)) + entry
|
||||||
|
with open('/usr/share/pixmaps/bootloader/fedora.icns', 'wb') as f:
|
||||||
|
f.write(icns)
|
||||||
|
"
|
||||||
|
|||||||
47
files/scripts/cachyos-kernel.sh
Normal file
47
files/scripts/cachyos-kernel.sh
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Replaces the stock Fedora kernel with the CachyOS LTO kernel.
|
||||||
|
# CachyOS LTO kernel is compiled with Link-Time Optimization and ships
|
||||||
|
# sched-ext (SCX) support, giving lower latency for realtime audio workloads.
|
||||||
|
#
|
||||||
|
# Adapted from the Zena project (https://github.com/zena-linux/zena),
|
||||||
|
# specifically build-scripts/modules/base/kernel.sh.
|
||||||
|
# Zena is licensed under the Apache License 2.0.
|
||||||
|
# Credit to the Zena contributors: https://github.com/zena-linux/zena/graphs/contributors
|
||||||
|
|
||||||
|
set -ouex pipefail
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
|
KERNEL_PACKAGES=(
|
||||||
|
kernel-cachyos-lto
|
||||||
|
kernel-cachyos-lto-core
|
||||||
|
kernel-cachyos-lto-devel-matched
|
||||||
|
kernel-cachyos-lto-modules
|
||||||
|
)
|
||||||
|
|
||||||
|
# Disable kernel install hooks so the custom kernel installs cleanly into the image
|
||||||
|
pushd /usr/lib/kernel/install.d
|
||||||
|
printf '%s\n' '#!/bin/sh' 'exit 0' > 05-rpmostree.install
|
||||||
|
printf '%s\n' '#!/bin/sh' 'exit 0' > 50-dracut.install
|
||||||
|
chmod +x 05-rpmostree.install 50-dracut.install
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Remove stock Fedora kernel packages
|
||||||
|
for pkg in kernel kernel-core kernel-modules kernel-modules-core; do
|
||||||
|
rpm --erase "$pkg" --nodeps || true
|
||||||
|
done
|
||||||
|
|
||||||
|
# Remove leftover kernel module directory
|
||||||
|
CURRENT_MODULES=$(ls /usr/lib/modules | head -n1)
|
||||||
|
if [ -n "$CURRENT_MODULES" ]; then
|
||||||
|
rm -rf "/usr/lib/modules/$CURRENT_MODULES"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install the CachyOS LTO kernel (repos were added via the preceding dnf module)
|
||||||
|
dnf5 -y install "${KERNEL_PACKAGES[@]}"
|
||||||
|
|
||||||
|
# Version-lock to prevent the kernel from being overwritten by base image updates
|
||||||
|
dnf5 versionlock add "${KERNEL_PACKAGES[@]}" || true
|
||||||
|
|
||||||
|
# /boot is not used in atomic container images
|
||||||
|
rm -rf /boot/*
|
||||||
@@ -2,6 +2,8 @@ modules:
|
|||||||
- type: dnf
|
- type: dnf
|
||||||
repos:
|
repos:
|
||||||
copr:
|
copr:
|
||||||
|
- bieszczaders/kernel-cachyos-lto
|
||||||
|
- bieszczaders/kernel-cachyos-addons
|
||||||
- patrickl/wine-tkg
|
- patrickl/wine-tkg
|
||||||
- timlau/audio
|
- timlau/audio
|
||||||
- alternateved/eza
|
- alternateved/eza
|
||||||
|
|||||||
@@ -1,7 +1,23 @@
|
|||||||
modules:
|
modules:
|
||||||
|
- type: dnf
|
||||||
|
remove:
|
||||||
|
packages:
|
||||||
|
- zram-generator-defaults
|
||||||
|
|
||||||
- type: dnf
|
- type: dnf
|
||||||
install:
|
install:
|
||||||
packages:
|
packages:
|
||||||
|
# CachyOS kernel performance companion packages
|
||||||
|
# cachyos-settings: kernel tunables and sysctl optimisations from CachyOS
|
||||||
|
# cachyos-ksm-settings: Kernel Samepage Merging tuning (reduces RAM usage)
|
||||||
|
# scx-manager / scx-scheds / scx-tools: sched-ext schedulers;
|
||||||
|
# scx_lavd is ideal for low-latency realtime audio workloads
|
||||||
|
- cachyos-settings
|
||||||
|
- cachyos-ksm-settings
|
||||||
|
- scx-manager
|
||||||
|
- scx-scheds-git
|
||||||
|
- scx-tools-git
|
||||||
|
|
||||||
# useful tools
|
# useful tools
|
||||||
- zsh
|
- zsh
|
||||||
- openssl
|
- openssl
|
||||||
|
|||||||
@@ -3,13 +3,25 @@
|
|||||||
# image will be published to ghcr.io/<user>/<name>
|
# image will be published to ghcr.io/<user>/<name>
|
||||||
name: miasma-os
|
name: miasma-os
|
||||||
# description will be included in the image's metadata
|
# description will be included in the image's metadata
|
||||||
description: An personal spin based on Bazzite targeted towards musicians and music producers inspired by Fedora Jam
|
description: A personal spin based on Kinoite targeted towards musicians and music producers, with the CachyOS kernel for low-latency performance
|
||||||
|
|
||||||
# the base image to build on top of (FROM) and the version tag to use
|
# the base image to build on top of (FROM) and the version tag to use
|
||||||
base-image: ghcr.io/ublue-os/bazzite
|
base-image: ghcr.io/ublue-os/kinoite-main
|
||||||
image-version: latest # latest is also supported if you want new updates ASAP
|
image-version: latest # latest is also supported if you want new updates ASAP
|
||||||
|
|
||||||
modules:
|
modules:
|
||||||
|
# Add CachyOS repos first so the kernel swap script can use them
|
||||||
|
- type: dnf
|
||||||
|
repos:
|
||||||
|
copr:
|
||||||
|
- bieszczaders/kernel-cachyos-lto
|
||||||
|
- bieszczaders/kernel-cachyos-addons
|
||||||
|
|
||||||
|
# Swap stock Fedora kernel for CachyOS LTO kernel
|
||||||
|
- type: script
|
||||||
|
scripts:
|
||||||
|
- cachyos-kernel.sh
|
||||||
|
|
||||||
- type: dnf
|
- type: dnf
|
||||||
install:
|
install:
|
||||||
packages:
|
packages:
|
||||||
|
|||||||
Reference in New Issue
Block a user