bazzite/Containerfile

121 lines
4.6 KiB
Plaintext
Raw Normal View History

ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-kinoite}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}"
ARG SOURCE_IMAGE="${SOURCE_IMAGE:-$BASE_IMAGE_NAME-$IMAGE_FLAVOR}"
ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-38}"
FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS bazzite
ARG IMAGE_NAME="${IMAGE_NAME}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"
2023-02-09 19:08:39 +00:00
COPY system_files/desktop/etc /etc
COPY system_files/desktop/usr /usr
2023-02-09 19:08:39 +00:00
# Add Copr repos
RUN wget https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/repo/fedora-$(rpm -E %fedora)/kylegospo-bazzite-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_kylegospo-bazzite.repo && \
wget https://copr.fedorainfracloud.org/coprs/kylegospo/system76-scheduler/repo/fedora-$(rpm -E %fedora)/kylegospo-system76-scheduler-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_kylegospo-system76-scheduler.repo && \
wget https://copr.fedorainfracloud.org/coprs/kylegospo/hl2linux-selinux/repo/fedora-$(rpm -E %fedora)/kylegospo-hl2linux-selinux-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_kylegospo-hl2linux-selinux.repo
2023-02-09 19:08:39 +00:00
# Install new packages
RUN rpm-ostree install \
2023-06-23 18:54:54 +00:00
python3-pip \
2023-06-25 00:05:16 +00:00
libadwaita \
distrobox \
steamdeck-kde-themes \
sddm-sugar-steamOS \
wallpaper-engine-kde-plugin \
duperemove \
kdeconnectd \
2023-06-27 14:40:04 +00:00
input-remapper \
system76-scheduler \
hl2linux-selinux \
btop \
2023-06-23 18:39:07 +00:00
fish \
python3-pip
# Remove unneeded packages
RUN rpm-ostree override remove \
firefox \
firefox-langpacks \
plasma-welcome \
toolbox
# Cleanup & Finalize
2023-06-23 18:39:07 +00:00
RUN pip install --prefix=/usr yafti && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-system76-scheduler.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-hl2linux-selinux.repo && \
sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/user.conf && \
sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/system.conf && \
sed -i 's/#AutomaticUpdatePolicy.*/AutomaticUpdatePolicy=stage/' /etc/rpm-ostreed.conf && \
systemctl enable rpm-ostreed-automatic.timer && \
2023-06-27 14:40:04 +00:00
systemctl enable input-remapper.service && \
rm -rf \
/tmp/* \
/var/* && \
mkdir -p /var/lib/duperemove && \
ostree container commit && \
mkdir -p /var/tmp && \
chmod -R 1777 /var/tmp
FROM bazzite as bazzite-deck
ARG IMAGE_NAME="${IMAGE_NAME}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"
2023-06-23 18:54:54 +00:00
# Add LatencyFleX Copr
RUN wget https://copr.fedorainfracloud.org/coprs/kylegospo/LatencyFleX/repo/fedora-$(rpm -E %fedora)/kylegospo-LatencyFleX-fedora-$(rpm -E %fedora).repo -O \
/etc/yum.repos.d/_copr_kylegospo-latencyflex.repo
2023-06-23 18:54:54 +00:00
# Re-enable Copr repos
RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_kylegospo-bazzite.repo && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_kylegospo-hl2linux-selinux.repo
# Remove system76-scheduler
RUN rpm-ostree override remove system76-scheduler
RUN rm -f /usr/bin/system76-scheduler-dbus-proxy.sh
# Remove steamdeck-kde-themes
RUN rpm-ostree override remove steamdeck-kde-themes
COPY system_files/deck/etc /etc
COPY system_files/deck/usr /usr
RUN ln -s /usr/bin/steamos-logger /usr/bin/steamos-info && \
ln -s /usr/bin/steamos-logger /usr/bin/steamos-notice && \
ln -s /usr/bin/steamos-logger /usr/bin/steamos-warning
# Install new packages
RUN rpm-ostree install \
steam \
gamescope \
gamescope-session \
jupiter-fan-control \
jupiter-hw-support-btrfs \
steamdeck-kde-presets \
ryzenadj \
gamemode \
latencyflex-vulkan-layer \
vkBasalt \
mangohud \
skopeo
2023-02-09 19:08:39 +00:00
2023-06-23 18:54:54 +00:00
# Install dock updater, this is done manually due to proprietary parts preventing it from being on Copr.
2023-02-09 19:08:39 +00:00
RUN git clone https://github.com/KyleGospo/jupiter-dock-updater-bin.git && \
mv -v jupiter-dock-updater-bin/packaged/usr/lib/jupiter-dock-updater /usr/lib/jupiter-dock-updater
2023-02-09 19:08:39 +00:00
# Suspend using power button
RUN sed -i 's/#HandlePowerKey=poweroff/HandlePowerKey=suspend/g' /etc/systemd/logind.conf
2023-02-09 19:08:39 +00:00
# Cleanup & Finalize
RUN sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite.repo && \
2023-02-09 19:08:39 +00:00
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-latencyflex.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-hl2linux-selinux.repo && \
systemctl enable set-cfs-tweaks.service && \
systemctl enable gamescope-autologin.service && \
2023-02-09 19:08:39 +00:00
rm -rf \
2023-02-15 15:27:19 +00:00
/tmp/* \
/var/* && \
2023-02-09 22:56:17 +00:00
mkdir -p /var/lib/duperemove && \
2023-02-09 19:08:39 +00:00
ostree container commit