Skip to content

Commit d83cfd0

Browse files
committed
test cachyos kernel
1 parent dd841c8 commit d83cfd0

4 files changed

Lines changed: 274 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,40 @@ jobs:
5252
registry_token: ${{ github.token }}
5353
pr_event_number: ${{ github.event.number }}
5454
maximize_build_space: true
55+
56+
# Job 3: Build CachyOS variant
57+
build-cachyos:
58+
name: Build CachyOS Image (Experimental)
59+
runs-on: ubuntu-latest
60+
permissions:
61+
contents: read
62+
packages: write
63+
id-token: write
64+
steps:
65+
- name: Build CachyOS Image
66+
uses: blue-build/[email protected]
67+
with:
68+
recipe: recipe-cachyos.yml
69+
cosign_private_key: ${{ secrets.SIGNING_SECRET }}
70+
registry_token: ${{ github.token }}
71+
pr_event_number: ${{ github.event.number }}
72+
maximize_build_space: true
73+
74+
# Job 4: Build CachyOS NVIDIA variant
75+
build-cachyos-nvidia:
76+
name: Build CachyOS NVIDIA Image (Experimental)
77+
runs-on: ubuntu-latest
78+
needs: build-cachyos
79+
permissions:
80+
contents: read
81+
packages: write
82+
id-token: write
83+
steps:
84+
- name: Build CachyOS NVIDIA Image
85+
uses: blue-build/[email protected]
86+
with:
87+
recipe: recipe-cachyos-nvidia.yml
88+
cosign_private_key: ${{ secrets.SIGNING_SECRET }}
89+
registry_token: ${{ github.token }}
90+
pr_event_number: ${{ github.event.number }}
91+
maximize_build_space: true
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#!/bin/bash
2+
3+
# CachyOS Kernel Configuration Script for Origami Linux
4+
# This script configures the CachyOS kernel as default and applies optimal settings
5+
6+
set -euo pipefail
7+
8+
echo "🔧 Configuring CachyOS kernel for Origami Linux..."
9+
10+
# Create kernel postinst.d directory if it doesn't exist
11+
mkdir -p /etc/kernel/postinst.d
12+
13+
# Create script to set CachyOS kernel as default after updates
14+
cat > /etc/kernel/postinst.d/99-default-cachyos << 'EOF'
15+
#!/bin/sh
16+
17+
set -e
18+
19+
# Set the latest CachyOS kernel as the default kernel
20+
grubby --set-default=/boot/$(ls /boot | grep vmlinuz.*cachy | sort -V | tail -1)
21+
EOF
22+
23+
# Make the script executable
24+
chmod +x /etc/kernel/postinst.d/99-default-cachyos
25+
chown root:root /etc/kernel/postinst.d/99-default-cachyos
26+
27+
# Set current CachyOS kernel as default
28+
if ls /boot/vmlinuz*cachy* &> /dev/null; then
29+
CACHY_KERNEL=$(ls /boot | grep vmlinuz.*cachy | sort -V | tail -1)
30+
grubby --set-default=/boot/${CACHY_KERNEL}
31+
echo "✅ Set CachyOS kernel as default: ${CACHY_KERNEL}"
32+
fi
33+
34+
# Create default scx scheduler configuration
35+
mkdir -p /etc/default
36+
cat > /etc/default/scx << 'EOF'
37+
# SCX Scheduler Configuration for Origami Linux
38+
# Using scx_bpfland for optimal desktop performance
39+
40+
SCX_SCHEDULER="scx_bpfland"
41+
SCX_FLAGS=""
42+
EOF
43+
44+
# Enable and start ananicy-cpp for automatic process nice adjustment
45+
if systemctl list-unit-files | grep -q ananicy-cpp.service; then
46+
systemctl enable ananicy-cpp.service
47+
echo "✅ Enabled ananicy-cpp service for automatic process optimization"
48+
fi
49+
50+
# Configure SELinux for kernel module loading if SELinux is enabled
51+
if command -v getenforce &> /dev/null && [ "$(getenforce)" != "Disabled" ]; then
52+
setsebool -P domain_kernel_load_modules on
53+
echo "✅ Configured SELinux for kernel module loading"
54+
fi
55+
56+
# Apply CachyOS settings optimizations
57+
if command -v dracut &> /dev/null; then
58+
echo "🔄 Rebuilding initramfs with CachyOS settings..."
59+
dracut -f
60+
echo "✅ Initramfs rebuilt with CachyOS optimizations"
61+
fi
62+
63+
echo "🎉 CachyOS kernel configuration completed successfully!"
64+
echo ""
65+
echo "📋 What was configured:"
66+
echo " • CachyOS kernel set as default boot option"
67+
echo " • Auto-selection script installed for future kernel updates"
68+
echo " • SCX scheduler configured (scx_bpfland for desktop)"
69+
echo " • Ananicy-cpp enabled for process optimization"
70+
echo " • SELinux configured for kernel modules"
71+
echo " • Initramfs rebuilt with optimizations"
72+
echo ""
73+
echo "🔄 Please reboot to use the CachyOS kernel"

recipes/recipe-cachyos-nvidia.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# yaml-language-server: $schema=https://schema.blue-build.org/recipe-v1.json
2+
3+
name: origami-linux-cachyos-nvidia
4+
5+
description: "EXPERIMENTAL: Origami Linux with CachyOS kernel and NVIDIA support. This is a testing variant - use at your own risk."
6+
7+
# This pulls the experimental CachyOS base image
8+
base-image: ghcr.io/john-holt4/origami-linux-cachyos
9+
image-version: latest
10+
11+
modules:
12+
# CachyOS kernel includes prebuilt nvidia-open modules, so we only need userspace components
13+
- type: dnf
14+
repos:
15+
cleanup: true
16+
files:
17+
- https://negativo17.org/repos/fedora-nvidia.repo
18+
- https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo
19+
install:
20+
packages:
21+
# NVIDIA userspace drivers and libraries
22+
- nvidia-driver
23+
- nvidia-driver-libs
24+
- nvidia-driver-cuda-libs
25+
- nvidia-settings
26+
- nvidia-persistenced
27+
- libva-nvidia-driver
28+
# Container support
29+
- nvidia-container-toolkit
30+
- libnvidia-container-tools
31+
32+
# 2. Rebuild the initramfs to include the new drivers
33+
- type: initramfs
34+
35+
# 3. Sign this new NVIDIA-specific image
36+
- type: signing

recipes/recipe-cachyos.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# yaml-language-server: $schema=https://schema.blue-build.org/recipe-v1.json
2+
3+
name: origami-linux-cachyos
4+
5+
description: "EXPERIMENTAL: Origami Linux with CachyOS kernel for enhanced performance. This is a testing variant - use at your own risk."
6+
7+
base-image: ghcr.io/ublue-os/base-main
8+
image-version: latest
9+
modules:
10+
11+
- type: dnf
12+
repos:
13+
cleanup: true
14+
copr:
15+
- dejan/lazygit
16+
- lihaohong/yazi
17+
- alternateved/eza
18+
- atim/starship
19+
- dejan/rpms
20+
- bieszczaders/kernel-cachyos
21+
- bieszczaders/kernel-cachyos-addons
22+
files:
23+
- https://pkg.cloudflareclient.com/cloudflare-warp-ascii.repo
24+
keys:
25+
- https://pkg.cloudflareclient.com/pubkey.gpg
26+
27+
install:
28+
packages:
29+
- cosmic-app-library
30+
- cosmic-applets
31+
- cosmic-bg
32+
- cosmic-comp
33+
- cosmic-edit
34+
- cosmic-files
35+
- cosmic-greeter
36+
- cosmic-icon-theme
37+
- cosmic-idle
38+
- cosmic-initial-setup
39+
- cosmic-launcher
40+
- cosmic-notifications
41+
- cosmic-osd
42+
- cosmic-panel
43+
- cosmic-randr
44+
- cosmic-screenshot
45+
- cosmic-session
46+
- cosmic-settings
47+
- cosmic-settings-daemon
48+
- cosmic-store
49+
- cosmic-term
50+
- cosmic-wallpapers
51+
- cosmic-workspaces
52+
- pop-launcher
53+
- xdg-desktop-portal-cosmic
54+
- cloudflare-warp
55+
- helix
56+
- cowsay
57+
- lolcat
58+
- figlet
59+
- btop
60+
- fastfetch
61+
- podman-compose
62+
- axel
63+
- aria2c
64+
- cava
65+
- bat
66+
- ripgrep
67+
- zoxide
68+
- lazygit
69+
- yazi
70+
- eza
71+
- hyperfine
72+
- starship
73+
- cbonsai
74+
- cmatrix
75+
- tty-clock
76+
- sudo-rs
77+
- uutils-coreutils
78+
- kernel-cachyos
79+
- kernel-cachyos-devel-matched
80+
- cachyos-settings
81+
- scx-scheds
82+
- ananicy-cpp
83+
84+
remove:
85+
auto-remove: true
86+
packages:
87+
- htop
88+
- nvtop
89+
- firefox
90+
- firefox-langpacks
91+
- kernel
92+
- kernel-core
93+
- kernel-modules
94+
- kernel-modules-core
95+
- kernel-modules-extra
96+
- zram-generator-defaults
97+
98+
- type: fonts
99+
fonts:
100+
nerd-fonts:
101+
- JetBrainsMono
102+
google-fonts:
103+
- Inter
104+
105+
- type: files
106+
files:
107+
- source: system
108+
destination: /
109+
110+
- type: script
111+
snippets:
112+
- git clone https://github.com/vinceliuice/WhiteSur-icon-theme.git /tmp/WhiteSur-icon-theme
113+
- /tmp/WhiteSur-icon-theme/install.sh -b -a
114+
- rm -rf /tmp/WhiteSur-icon-theme
115+
- chmod +x /usr/share/origami/scripts/configure-cachyos-kernel.sh
116+
- /usr/share/origami/scripts/configure-cachyos-kernel.sh
117+
118+
- type: os-release
119+
properties:
120+
ID: origami_Linux_CachyOS
121+
NAME: Origami Linux (CachyOS)
122+
PRETTY_NAME: Origami 折り紙 (CachyOS Experimental)
123+
HOME_URL: "https://github.com/john-holt4/Origami"
124+
BUG_REPORT_URL: "https://github.com/john-holt4/Origami/issues"
125+
126+
- type: initramfs
127+
128+
- type: signing

0 commit comments

Comments
 (0)