Skip to content

Commit

Permalink
feat: Use an environment variable for the kernel module type selector…
Browse files Browse the repository at this point in the history
…, default to proprietary for now.
  • Loading branch information
KyleGospo committed Aug 7, 2024
1 parent 0c9f802 commit d3c4fec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build-kmod-nvidia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -oeux pipefail

RELEASE="$(rpm -E '%fedora.%_arch')"
NVIDIA_DRIVER_TYPE="${1:-kernel}"

cd /tmp

Expand All @@ -15,8 +16,8 @@ cp /tmp/ublue-os-nvidia-addons/rpmbuild/SOURCES/negativo17-fedora-nvidia.repo /e
dnf install -y \
akmod-nvidia*.fc${RELEASE}

# Switch to the open source kernel module
sed -i -e 's/kernel$/kernel-open/g' /etc/nvidia/kernel.conf
# Switch to the desired driver flavor
sed -i "s/^MODULE_VARIANT=.*/MODULE_VARIANT=$NVIDIA_DRIVER_TYPE/" /etc/nvidia/kernel.conf

# Either successfully build and install the kernel modules, or fail early with debug output
rpm -qa |grep nvidia
Expand Down

0 comments on commit d3c4fec

Please sign in to comment.