nixos-conf/hardware-specific/intel-laptop.nix

35 lines
872 B
Nix
Raw Normal View History

2024-11-21 14:25:33 +02:00
{ config, pkgs, ... }:
{
2025-01-13 17:59:00 +02:00
hardware.graphics = {
extraPackages = with pkgs; [
intel-media-driver
intel-compute-runtime
];
};
2024-11-21 14:25:33 +02:00
services = {
tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
2024-11-21 14:25:33 +02:00
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
2024-11-21 14:25:33 +02:00
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 40;
2024-11-21 14:25:33 +02:00
#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 60; # 60 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
2024-11-21 14:25:33 +02:00
};
2024-11-21 14:25:33 +02:00
};
logind.lidSwitch = if config.boot.resumeDevice != "" then "hibernate" else "suspend";
2024-11-21 14:25:33 +02:00
};
}