mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-12-03 23:55:04 +01:00
48 lines
1.9 KiB
Nix
48 lines
1.9 KiB
Nix
{ 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
|
|
];
|
|
|
|
# https://nixos.wiki/wiki/Linux_kernel#List_available_kernels
|
|
# List all available kernel versions:
|
|
# `nix repl` -> `:l <nixpkgs>` -> `pkgs.linuxPackages` and press `TAB`
|
|
|
|
# Default value.
|
|
#boot.kernelPackages = pkgs.linuxPackages;
|
|
# Latest stable.
|
|
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
# Latest unstable.
|
|
#boot.kernelPackages = pkgs.unstable.linuxPackages_latest;
|
|
|
|
# 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;
|
|
|
|
# Hardened.
|
|
# https://archlinux.org/packages/extra/x86_64/linux-hardened/
|
|
# -> https://github.com/anthraxx/linux-hardened
|
|
#boot.kernelPackages = pkgs.linuxPackages_hardened;
|
|
# Free/Libre.
|
|
# https://en.wikipedia.org/wiki/Linux-libre
|
|
#boot.kernelPackages = pkgs.linuxPackages-libre;
|
|
}
|