From 102c75573c25ee649935eb9a374c57d25f53b045 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Thu, 8 Feb 2024 20:31:51 +0100 Subject: [PATCH] yodaTux: fix LAN internet --- hosts/yodaTux/configuration.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/hosts/yodaTux/configuration.nix b/hosts/yodaTux/configuration.nix index 295d72b..8d9aad3 100644 --- a/hosts/yodaTux/configuration.nix +++ b/hosts/yodaTux/configuration.nix @@ -74,12 +74,30 @@ # S Sat Sep 23 16:11:52 2023 p4 kernel: TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'. boot.kernelParams = [ "tsc=unstable" ]; + # LAN Internet is not working, only WiFi. + # Replacing in-kernel r8169 with r8168 fixes this. + # 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 kernels >= 6 + # https://github.com/NixOS/nixpkgs/issues/256329 + # This does not help, there is a compile error + # nixpkgs.config.allowBroken = true; + # + boot.blacklistedKernelModules = [ "r8169" ]; + boot.extraModulePackages = [ + config.boot.kernelPackages.r8168 + ]; + # List all available kernel versions: # `nix repl` -> `:l ` -> `pkgs.linuxPackages` and press `TAB` # Default. #boot.kernelPackages = pkgs.linuxPackages; # Latest. - boot.kernelPackages = pkgs.linuxPackages_latest; + #boot.kernelPackages = pkgs.linuxPackages_latest; + # LTS, see https://endoflife.date/linux + boot.kernelPackages = pkgs.linuxPackages_5_15; + #boot.kernelPackages = pkgs.linuxPackages_6_1; # Hardened. # https://archlinux.org/packages/extra/x86_64/linux-hardened/ # -> https://github.com/anthraxx/linux-hardened