From 81b396a390d9174e60ae50b394b58f11166ae179 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 23 Feb 2016 12:34:52 +0100 Subject: 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 Cc: @Profpatsch --- modules/hardware/thinkpad.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 modules/hardware/thinkpad.nix (limited to 'modules/hardware') 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; + }; +} -- cgit 1.4.1