about summary refs log tree commit diff
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
parenta508abd3441d9799fc00f96fe76bdf152bdfb100 (diff)
hardware.tinkpad: module for thinkpad options
-rw-r--r--modules/module-list.nix1
-rw-r--r--modules/system/thinkpad.nix31
2 files changed, 32 insertions, 0 deletions
diff --git a/modules/module-list.nix b/modules/module-list.nix
index 771ba1d9..09f70509 100644
--- a/modules/module-list.nix
+++ b/modules/module-list.nix
@@ -4,6 +4,7 @@
   ./services/multipath-vpn.nix
   ./services/postfix
   ./system/iso.nix
+  ./system/thinkpad.nix
   ./user/aszlig/profiles/base.nix
   ./user/aszlig/profiles/workstation
   ./user/aszlig/programs/gajim
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;
+  };
+}