From 356ebeaaf77f2019c0c5d6756ec8ded4cabd1353 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 6 Sep 2017 10:01:01 +0200 Subject: [PATCH] Introduce `general-intel.nix` for defaults with Intel CPU The x1xx series relies on a AMD CPU, but all other (currently supported) ThinkPads use an Intel CPU, so `general-intel.nix` is responsible for all Intel defaults. --- lenovo/thinkpad/general-intel.nix | 6 ++++++ lenovo/thinkpad/t410.nix | 2 +- lenovo/thinkpad/t440p.nix | 4 ++-- lenovo/thinkpad/t460s.nix | 2 +- lenovo/thinkpad/x220i-tablet.nix | 2 +- lenovo/thinkpad/x250.nix | 5 +---- 6 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 lenovo/thinkpad/general-intel.nix diff --git a/lenovo/thinkpad/general-intel.nix b/lenovo/thinkpad/general-intel.nix new file mode 100644 index 0000000..5aeec18 --- /dev/null +++ b/lenovo/thinkpad/general-intel.nix @@ -0,0 +1,6 @@ +{ ... }: + +{ + boot.kernelModules = mkDefault [ "kvm-intel" ]; + services.xserver.videoDrivers = [ "intel" ]; +} diff --git a/lenovo/thinkpad/t410.nix b/lenovo/thinkpad/t410.nix index 56e49cb..5737cc6 100644 --- a/lenovo/thinkpad/t410.nix +++ b/lenovo/thinkpad/t410.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - imports = [ ./general.nix ]; + imports = [ ./general-intel.nix ]; boot = { kernelParams = [ diff --git a/lenovo/thinkpad/t440p.nix b/lenovo/thinkpad/t440p.nix index af4e764..4d96bbb 100644 --- a/lenovo/thinkpad/t440p.nix +++ b/lenovo/thinkpad/t440p.nix @@ -1,12 +1,12 @@ { config, pkgs, ... }: { - imports = [ ./general.nix ]; + imports = [ ./general-intel.nix ]; boot = { extraModprobeConfig = '' options bbswitch use_acpi_to_detect_card_state=1 ''; - kernelModules = [ "kvm-intel" "tpm-rng" ]; + kernelModules = [ "tpm-rng" ]; }; } diff --git a/lenovo/thinkpad/t460s.nix b/lenovo/thinkpad/t460s.nix index a274b37..d6f2ba3 100644 --- a/lenovo/thinkpad/t460s.nix +++ b/lenovo/thinkpad/t460s.nix @@ -3,7 +3,7 @@ { imports = [ ../lib/kernel-version.nix - ./general.nix + ./general-intel.nix ]; ## BEGIN from generated hardware-configuration diff --git a/lenovo/thinkpad/x220i-tablet.nix b/lenovo/thinkpad/x220i-tablet.nix index 3c729ba..65a4a3d 100644 --- a/lenovo/thinkpad/x220i-tablet.nix +++ b/lenovo/thinkpad/x220i-tablet.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - imports = [ ./general.nix ]; + imports = [ ./general-intel.nix ]; # TPM chip countains a RNG security.rngd.enable = true; diff --git a/lenovo/thinkpad/x250.nix b/lenovo/thinkpad/x250.nix index 8ab1aa5..200327f 100644 --- a/lenovo/thinkpad/x250.nix +++ b/lenovo/thinkpad/x250.nix @@ -1,8 +1,5 @@ { config, pkgs, ... }: { - imports = [ ./general.nix ]; - - # modesetting driver leads to freezes with newer kernel at the moment (> 4.4) - services.xserver.videoDrivers = [ "intel" ]; + imports = [ ./general-intel.nix ]; }