summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lenovo/thinkpad/default.nix7
-rw-r--r--lenovo/thinkpad/t410/default.nix2
-rw-r--r--lenovo/thinkpad/tp-smapi.nix11
-rw-r--r--lenovo/thinkpad/x220/default.nix2
4 files changed, 14 insertions, 8 deletions
diff --git a/lenovo/thinkpad/default.nix b/lenovo/thinkpad/default.nix
index 9b82b8b..ae9804b 100644
--- a/lenovo/thinkpad/default.nix
+++ b/lenovo/thinkpad/default.nix
@@ -1,11 +1,6 @@
-{ config, lib, pkgs, ... }:
+{ lib, pkgs, ... }:
{
- boot = {
- kernelModules = [ "tp_smapi" ];
- extraModulePackages = with config.boot.kernelPackages; [ tp_smapi ];
- };
-
hardware.trackpoint.enable = lib.mkDefault true;
services.tlp.enable = lib.mkDefault true;
services.xserver.libinput.enable = lib.mkDefault true;
diff --git a/lenovo/thinkpad/t410/default.nix b/lenovo/thinkpad/t410/default.nix
index ec8cbc7..568d9e6 100644
--- a/lenovo/thinkpad/t410/default.nix
+++ b/lenovo/thinkpad/t410/default.nix
@@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
{
- imports = [ ../. ];
+ imports = [ ../. ../tp-smapi.nix ];
boot = {
kernelParams = [
diff --git a/lenovo/thinkpad/tp-smapi.nix b/lenovo/thinkpad/tp-smapi.nix
new file mode 100644
index 0000000..451dd28
--- /dev/null
+++ b/lenovo/thinkpad/tp-smapi.nix
@@ -0,0 +1,11 @@
+# tp_smapi works on ThinkPads made before 2013. See compat table:
+# https://www.thinkwiki.org/wiki/Tp_smapi#Model-specific_status
+
+{ config, ... }:
+
+{
+ boot = {
+ kernelModules = [ "tp_smapi" ];
+ extraModulePackages = with config.boot.kernelPackages; [ tp_smapi ];
+ };
+}
diff --git a/lenovo/thinkpad/x220/default.nix b/lenovo/thinkpad/x220/default.nix
index d3e723d..efa67fc 100644
--- a/lenovo/thinkpad/x220/default.nix
+++ b/lenovo/thinkpad/x220/default.nix
@@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
{
- imports = [ ../. ];
+ imports = [ ../. ../tp-smapi.nix ];
# hard disk protection if the laptop falls
services.hdapsd.enable = lib.mkDefault true;