diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-02-23 12:34:52 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-02-23 12:34:52 +0100 |
commit | 81b396a390d9174e60ae50b394b58f11166ae179 (patch) | |
tree | 3d6daa824a55bfdd1837af14da4521cd975bac4e /modules/hardware/thinkpad.nix | |
parent | d75d10557921089d34e76e6001440a02ceccfd24 (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/thinkpad.nix')
-rw-r--r-- | modules/hardware/thinkpad.nix | 31 |
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; + }; +} |