about summary refs log tree commit diff
path: root/modules/hardware
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-02-23 12:34:52 +0100
committeraszlig <aszlig@redmoonstudios.org>2016-02-23 12:34:52 +0100
commit81b396a390d9174e60ae50b394b58f11166ae179 (patch)
tree3d6daa824a55bfdd1837af14da4521cd975bac4e /modules/hardware
parentd75d10557921089d34e76e6001440a02ceccfd24 (diff)
modules/thinkpad: Move into modules/hardware
We already have a directory just for hardware-specific configuration
options and the module option already says "vuizvui.hardware", so it
should better be consistent with the directory layout.

Tested using:

nix-instantiate release.nix -A machines.profpatsch.katara

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @Profpatsch
Diffstat (limited to 'modules/hardware')
-rw-r--r--modules/hardware/thinkpad.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/hardware/thinkpad.nix b/modules/hardware/thinkpad.nix
new file mode 100644
index 00000000..025ce760
--- /dev/null
+++ b/modules/hardware/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;
+  };
+}