thinkpad: only enable tp_smapi on compatible ThinkPads, closes #36
This commit is contained in:
parent
3743ae21f5
commit
08e080ae11
|
@ -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;
|
hardware.trackpoint.enable = lib.mkDefault true;
|
||||||
services.tlp.enable = lib.mkDefault true;
|
services.tlp.enable = lib.mkDefault true;
|
||||||
services.xserver.libinput.enable = lib.mkDefault true;
|
services.xserver.libinput.enable = lib.mkDefault true;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ../. ];
|
imports = [ ../. ../tp-smapi.nix ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
|
|
11
lenovo/thinkpad/tp-smapi.nix
Normal file
11
lenovo/thinkpad/tp-smapi.nix
Normal file
|
@ -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 ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ../. ];
|
imports = [ ../. ../tp-smapi.nix ];
|
||||||
|
|
||||||
# hard disk protection if the laptop falls
|
# hard disk protection if the laptop falls
|
||||||
services.hdapsd.enable = lib.mkDefault true;
|
services.hdapsd.enable = lib.mkDefault true;
|
||||||
|
|
Loading…
Reference in a new issue