summaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/features/services/hardware/tlp.nix13
-rw-r--r--nixos/systems/thinkpad-laptop/system.nix1
2 files changed, 14 insertions, 0 deletions
diff --git a/nixos/features/services/hardware/tlp.nix b/nixos/features/services/hardware/tlp.nix
new file mode 100644
index 0000000..7c114a8
--- /dev/null
+++ b/nixos/features/services/hardware/tlp.nix
@@ -0,0 +1,13 @@
+{ config, lib, ... }: let
+ cfg = config.features.services.hardware.tlp;
+in {
+ options.features.services.hardware.enable = lib.mkEnableOption "tlp";
+ config = lib.mkIf cfg.enable {
+ services.tlp = {
+ enable = true;
+ settings = {
+ USB_AUTOSUSPEND = 0;
+ };
+ };
+ };
+}
diff --git a/nixos/systems/thinkpad-laptop/system.nix b/nixos/systems/thinkpad-laptop/system.nix
index 28ff384..67a2ba6 100644
--- a/nixos/systems/thinkpad-laptop/system.nix
+++ b/nixos/systems/thinkpad-laptop/system.nix
@@ -44,6 +44,7 @@
services = {
core.systemd-boot.enable = true;
hardware = {
+ tlp.enable = true;
bluetooth.enable = true;
iwd.enable = true;
pipewire.enable = true;