blob: e4c1cd70faf702b55a893759a4b996d9e230a295 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.vuizvui.hardware.thinkpad;
in
{
options.vuizvui.hardware.thinkpad = {
enable = mkEnableOption "thinkpad support";
};
config = mkIf cfg.enable {
# read acpi stats (e.g. battery)
environment.systemPackages = [ pkgs.acpi ];
# for wifi
hardware.enableRedistributableFirmware = mkDefault true;
hardware.trackpoint = mkDefault {
enable = true;
emulateWheel = true;
speed = 250;
sensitivity = 140;
};
# TLP Linux Advanced Power Management
services.tlp.enable = mkDefault true;
boot = {
# acpi_call is required for some tlp features, e.g. discharge/recalibrate
kernelModules = [
"acpi_call"
];
extraModulePackages = [
config.boot.kernelPackages.acpi_call
];
};
};
}
|