From 8c2dbe4775b4c5eb33f03090938c5eb91c8007a4 Mon Sep 17 00:00:00 2001 From: Andreas Schaafsma Date: Sat, 17 Oct 2026 07:01:38 +0200 Subject: [PATCH] Update RTL8125 driver to 9.018.00 --- .../drivebystation-nix/configuration.nix | 4 +--- .../hardware/realtek-r8125.nix | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 systems/x86_64-linux/drivebystation-nix/hardware/realtek-r8125.nix diff --git a/systems/x86_64-linux/drivebystation-nix/configuration.nix b/systems/x86_64-linux/drivebystation-nix/configuration.nix index f0d5df6..a40c39a 100644 --- a/systems/x86_64-linux/drivebystation-nix/configuration.nix +++ b/systems/x86_64-linux/drivebystation-nix/configuration.nix @@ -12,12 +12,10 @@ imports = [ ./tigervnc.nix ./hardware/hardware-configuration.nix + ./hardware/realtek-r8125.nix ]; - # Use the default kernel maintained by the stable nixpkgs release. - boot.kernelPackages = pkgs.linuxPackages; - # Bootloader. # boot.loader.systemd-boot.enable = true; # managed by lanzaboote boot.loader.efi.canTouchEfiVariables = true; diff --git a/systems/x86_64-linux/drivebystation-nix/hardware/realtek-r8125.nix b/systems/x86_64-linux/drivebystation-nix/hardware/realtek-r8125.nix new file mode 100644 index 0000000..920982d --- /dev/null +++ b/systems/x86_64-linux/drivebystation-nix/hardware/realtek-r8125.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: + +{ + # Keep the vendor driver tied to this host's selected kernel, including its + # build dependencies and module installation path supplied by nixpkgs. + boot.kernelPackages = pkgs.linuxPackages.extend (_final: prev: { + r8125 = prev.r8125.overrideAttrs { + version = "9.018.00"; + # The mirror's top-level wrapper overrides BASEDIR with /lib/modules. + # Build in src directly so nixpkgs' kernel path reaches kbuild. + buildFlags = [ "-C" "src" "modules" ]; + # Realtek's release mirrored by the DKMS maintainer. Pin the source rather + # than running the vendor installer or following a mutable branch. + src = pkgs.fetchFromGitHub { + owner = "awesometic"; + repo = "realtek-r8125-dkms"; + rev = "9a152bf920334aead090d2fb4d91f67a84923123"; # 9.018.00-1 + hash = "sha256-yeQsyraNrms1Txm7ZAKeiPfF0tfN6WSHUo5DnvfFosw="; + }; + }; + }); +}