feat(ostree-images): import river template files from wayblue

This commit is contained in:
Alexander Navarro 2024-11-06 11:23:10 -03:00
parent 3f8e44008c
commit 576311545e
Signed by untrusted user who does not match committer: anavarro
GPG key ID: 6426043E9FA3E3B5
60 changed files with 2169 additions and 0 deletions

View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
echo '
import "/usr/share/ublue-os/just/50-brew.just"
' >> /usr/share/ublue-os/justfile

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
sed -i 's/launcher_thunar = thunar.desktop/launcher_chromium = org.mozilla.firefox.desktop\nlauncher_thunar = thunar.desktop/' /usr/share/wayfire/wf-shell.ini

View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
curl -Lo /etc/yum.repos.d/_copr_ublue-os_staging.repo https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${OS_VERSION}"/ublue-os-staging-fedora-"${OS_VERSION}".repo
rpm-ostree install android-udev-rules
rm /etc/yum.repos.d/_copr_ublue-os_staging.repo

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
semodule --verbose --install /usr/share/selinux/packages/nvidia-container.pp

View file

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
curl -Lo /etc/yum.repos.d/negativo17-fedora-multimedia.repo https://negativo17.org/repos/fedora-multimedia.repo
sed -i '0,/enabled=1/{s/enabled=1/enabled=1\npriority=90/}' /etc/yum.repos.d/negativo17-fedora-multimedia.repo
rpm-ostree override replace \
--experimental \
--from repo='fedora-multimedia' \
libheif \
libva \
libva-intel-media-driver \
mesa-dri-drivers \
mesa-filesystem \
mesa-libEGL \
mesa-libGL \
mesa-libgbm \
mesa-libglapi \
mesa-libxatracker \
mesa-va-drivers \
mesa-vulkan-drivers \
gstreamer1-plugin-libav \
gstreamer1-plugin-vaapi

View file

@ -0,0 +1,3 @@
rpm-ostree install \
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-${OS_VERSION}.noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${OS_VERSION}.noarch.rpm

View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
find /tmp/rpms
rpm-ostree cliwrap install-to-root /
QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(\d+\.\d+\.\d+)' | sed -E 's/kernel-//')"
INCOMING_KERNEL_VERSION="$(basename -s .rpm $(ls /tmp/rpms/kernel/kernel-[0-9]*.rpm 2>/dev/null | grep -P 'kernel-(\d+\.\d+\.\d+)' | sed -E 's/kernel-//'))"
echo "Qualified kernel: $QUALIFIED_KERNEL"
echo "Incoming kernel version: $INCOMING_KERNEL_VERSION"
if [[ "$INCOMING_KERNEL_VERSION" != "$QUALIFIED_KERNEL" ]]; then
echo "Installing kernel rpm from kernel-cache."
rpm-ostree override replace \
--experimental \
--install=zstd \
/tmp/rpms/kernel/kernel-[0-9]*.rpm \
/tmp/rpms/kernel/kernel-core-*.rpm \
/tmp/rpms/kernel/kernel-modules-*.rpm
else
echo "Installing kernel files from kernel-cache."
cd /tmp
rpm2cpio /tmp/rpms/kernel/kernel-core-*.rpm | cpio -idmv
cp ./lib/modules/*/vmlinuz /usr/lib/modules/*/vmlinuz
cd /
fi

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
rpm-ostree cliwrap install-to-root /
QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(\d+\.\d+\.\d+)' | sed -E 's/kernel-//')"
/usr/libexec/rpm-ostree/wrapped/dracut --no-hostonly --kver "$QUALIFIED_KERNEL" --reproducible -v --add ostree -f "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"
chmod 0600 "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"

View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
rm /usr/share/applications/org.gnome.ColorProfileViewer.desktop
rm /usr/share/applications/org.gnome.Settings.desktop
rm /usr/share/applications/org.gnome.Tecla.desktop
rm /usr/share/applications/org.gnome.Tour.desktop

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
for file in /usr/share/hyprland/*.png; do
if [[ $file == *anime*.png || $file == wall2.png ]]; then
rm "$file"
echo "Removed: $file"
fi
done

View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
rm -f /etc/yum.repos.d/negativo17-fedora-nvidia.repo
rm -f /etc/yum.repos.d/negativo17-fedora-multimedia.repo
rm -f /etc/yum.repos.d/eyecantcu-supergfxctl.repo
rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo
rm -f /etc/yum.repos.d/nvidia-container-toolkit.repo

View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
echo '
# Nvidia modesetting support. Set to 0 or comment to disable kernel modesetting
# support. This must be disabled in case of SLI Mosaic.
options nvidia-drm modeset=1 fbdev=1
' > /usr/lib/modprobe.d/nvidia-modeset.conf
cp /usr/lib/modprobe.d/nvidia-modeset.conf /etc/modprobe.d/nvidia-modeset.conf

View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
sed -i 's@omit_drivers@force_drivers@g' /usr/lib/dracut/dracut.conf.d/99-nvidia.conf
sed -i 's@ nvidia @ i915 amdgpu nvidia @g' /usr/lib/dracut/dracut.conf.d/99-nvidia.conf

View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
sed -i 's/sway\/workspaces/hyprland\/workspaces/' /etc/xdg/waybar/config.jsonc
sed -i 's/sway\/mode/hyprland\/submap/' /etc/xdg/waybar/config.jsonc
sed -i 's/sway\/window/hyprland\/window/' /etc/xdg/waybar/config.jsonc

View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
sed -i 's/sway\/workspaces/river\/tags/' /etc/xdg/waybar/config.jsonc
sed -i 's/sway\/mode/river\/mode/' /etc/xdg/waybar/config.jsonc
sed -i 's/sway\/window/river\/window/' /etc/xdg/waybar/config.jsonc

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
sed -i 's/color: "black"/color: "white"/' /usr/share/sddm/themes/maldives/Main.qml
sed -i 's/id: lblPassword/id: lblPassword\ncolor: "white"/' /usr/share/sddm/themes/maldives/Main.qml
sed -i 's/id: lblName/id: lblName\ncolor: "white"/' /usr/share/sddm/themes/maldives/Main.qml
sed -i 's/id: lblSession/id: lblSession\ncolor: "white"/' /usr/share/sddm/themes/maldives/Main.qml
sed -i 's/id: lblLayout/id: lblLayout\ncolor: "white"/' /usr/share/sddm/themes/maldives/Main.qml
sed -i 's/id: errorMessage/id: errorMessage\ncolor: "white"/' /usr/share/sddm/themes/maldives/Main.qml

View file

@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
rm /etc/sway/environment
echo '
# This file is a part of Fedora configuration for Sway and will be sourced
# from /usr/bin/start-sway script for all users of the system.
# User-specific variables should be placed in $XDG_CONFIG_HOME/sway/environment
#
# vim: set ft=sh:
## Pass extra arguments to the /usr/bin/sway executable
#SWAY_EXTRA_ARGS="$SWAY_EXTRA_ARGS --unsupported-gpu"
SWAY_EXTRA_ARGS="$SWAY_EXTRA_ARGS --unsupported-gpu -D noscanout"
#SWAY_EXTRA_ARGS="$SWAY_EXTRA_ARGS --debug"
## Set environment variables
# Useful variables for wlroots:
# https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/docs/env_vars.md
WLR_NO_HARDWARE_CURSORS=1
# Setting renderer to Vulkan may fix flickering but needs the following extensions:
# - VK_EXT_image_drm_format_modifier
# - VK_EXT_physical_device_drm
#
# Source: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/8e346922508aa3eaccd6e12f2917f6574f349843
WLR_RENDERER=vulkan
# Java Application compatibility
# Source: https://github.com/swaywm/wlroots/issues/1464
_JAVA_AWT_WM_NONREPARENTING=1
' > /etc/sway/environment

View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
# Removing this for now since it breaks steam layering.
# https://github.com/ublue-os/bluefin/issues/1258
# sed -i 's/Inherits=Adwaita/Inherits=Papirus/' /usr/share/icons/default/index.theme

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
sed -i 's/Icon=org.xfce.thunar/Icon=system-file-manager/' /usr/share/applications/thunar.desktop