Files
silverblue-images/Containerfile-lenovo-16arh7h
Ben Radey 15439af360
Build / supermicro-x10drh (push) Has been cancelled
Build / workstation-nvidia-base (push) Has been cancelled
Build / asrock-x570 (push) Has been cancelled
Build / lenovo-16arh7h (push) Has been cancelled
Resetting 'from' directives
2026-06-06 11:34:33 -04:00

35 lines
1.6 KiB
Plaintext

FROM git.radey.org/ben/workstation-nvidia-base:latest
# Build nvidia akmod with no special arguments - defaults to open kernel driver for newer hardware
RUN mkdir -p /var/log/akmods /var/cache/akmods/nvidia /var/tmp && \
chmod 777 /var/tmp && \
/usr/sbin/akmods --force --kernels "$(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
# blueman necessary for cinnamon, not necessary for gnome
RUN dnf5 install -y \
dkms \
powertop \
python3-pyusb \
radeontop \
waydroid \
xinput && \
dnf5 clean all
RUN git clone https://github.com/johnfanv2/LenovoLegionLinux.git && \
mkdir -p /usr/src/LenovoLegionLinux-1.0.0 && \
cp /LenovoLegionLinux/kernel_module/* /usr/src/LenovoLegionLinux-1.0.0 -r && \
dkms add -m LenovoLegionLinux -v 1.0.0 && \
dkms build -m LenovoLegionLinux -v 1.0.0 -k $(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') && \
dkms install -m LenovoLegionLinux -v 1.0.0 -k $(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') && \
echo legion-laptop > /etc/modules-load.d/legion_laptop.conf && \
rm -rf LenovoLegionLinux
# The first check makes sure that we have exactly 10 gpg pubkeys trusted in the rpmdb (the ones manually imported above) (Brave adds 6, apparently?).
# Any more than that means that dnf automatically added a new one, which is shady!
# Then: cleanup image for linting
# Finally: verify image is good
# FIXME - remove the `--skip nonempty-run-tmp` when it's no longer needed
RUN [[ 10 -eq $(rpm -qa gpg-pubkey* | wc -l) ]] && \
rm -rf /var /boot && mkdir /var /boot && \
bootc container lint --fatal-warnings --skip nonempty-run-tmp