mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
yodaTux: working lan with linux 6.1
This commit is contained in:
parent
dff8a2f909
commit
5788a5e3a3
@ -3,6 +3,7 @@
|
|||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./lan.nix
|
||||||
../../modules/home-manager.nix
|
../../modules/home-manager.nix
|
||||||
../../modules/nur-and-unstable.nix
|
../../modules/nur-and-unstable.nix
|
||||||
../../modules/unfree.nix
|
../../modules/unfree.nix
|
||||||
@ -80,39 +81,6 @@
|
|||||||
# S Sat Sep 23 16:11:52 2023 p4 kernel: TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'.
|
# 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" ];
|
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 <nixpkgs>` -> `pkgs.linuxPackages` and press `TAB`
|
|
||||||
# Default.
|
|
||||||
#boot.kernelPackages = pkgs.linuxPackages;
|
|
||||||
# Latest.
|
|
||||||
#boot.kernelPackages = pkgs.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;
|
|
||||||
#boot.kernelPackages = pkgs.linuxPackages_6_1;
|
|
||||||
# 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;
|
|
||||||
|
|
||||||
# Most users should never change this value after the initial install, for any reason, even if you've upgraded your system to a new NixOS release.
|
# Most users should never change this value after the initial install, for any reason, even if you've upgraded your system to a new NixOS release.
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
}
|
}
|
||||||
|
47
hosts/yodaTux/lan.nix
Normal file
47
hosts/yodaTux/lan.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{ 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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user