about summary refs log tree commit diff
path: root/modules/system
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2015-12-22 01:19:15 +0100
committerProfpatsch <mail@profpatsch.de>2015-12-22 01:35:44 +0100
commitd01346f2afa7a9620e67d10253a366a2387b8ff5 (patch)
tree3fd477aacffe8fdf6a1d2098c052c72bc5054133 /modules/system
parenta508abd3441d9799fc00f96fe76bdf152bdfb100 (diff)
hardware.tinkpad: module for thinkpad options
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/thinkpad.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/system/thinkpad.nix b/modules/system/thinkpad.nix
new file mode 100644
index 00000000..025ce760
--- /dev/null
+++ b/modules/system/thinkpad.nix
@@ -0,0 +1,31 @@
+{ 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.enableAllFirmware = true;
+
+    hardware.trackpoint = {
+      enable = true;
+      emulateWheel = true;
+      speed = 250;
+      sensitivity = 140;
+    };
+
+    # TLP Linux Advanced Power Management
+    services.tlp.enable = true;
+  };
+}