{ config, pkgs, ... }: { # Working LAN Internet vs mainline Linux. # # With the in-tree kernel driver r8169 for the network card (LAN and Wi-Fi), LAN Internet is not working. # # With the out-of-tree r8168 kernel driver, LAN is working. # https://github.com/avnik/nixos-configs/blob/master/modules/r8168.nix # https://github.com/poscat0x04/nixos-configuration/blob/master/hardware/profiles/r8168.nix # https://github.com/NixOS/nixpkgs/blob/961c422b48b3458a01a9c0f2a24e25a1d61018e9/pkgs/os-specific/linux/r8168/default.nix#L51-L52 # But this requires an old kernel version (we use 5.15 LTS) as r8168 is broken for 6 <= kernel <= 6.8 # https://github.com/NixOS/nixpkgs/issues/256329 # -> https://github.com/NixOS/nixpkgs/pull/311238 boot.blacklistedKernelModules = [ "r8169" ]; boot.extraModulePackages = [ config.boot.kernelPackages.r8168 ]; # LTS, see https://endoflife.date/linux # TODO: When NixOS 26.05 is out, this kernel is near EOL #boot.kernelPackages = pkgs.linuxPackages_5_15; # LTS, see https://endoflife.date/linux # TODO: When NixOS 26.05 is out, this kernel is near EOL boot.kernelPackages = pkgs.linuxPackages_6_1; nixpkgs.config.allowBroken = true; }