1
This commit is contained in:
@@ -15,7 +15,38 @@ in {
|
||||
./programs/hyprland.nix
|
||||
];
|
||||
|
||||
services.logind.lidSwitch = "suspend";
|
||||
services.logind = {
|
||||
lidSwitch = "suspend-then-hibernate";
|
||||
lidSwitchExternalPower = "suspend";
|
||||
lidSwitchDocked = "ignore";
|
||||
powerKey = "poweroff";
|
||||
powerKeyLongPress = "poweroff";
|
||||
};
|
||||
|
||||
systemd.sleep.extraConfig = ''
|
||||
HibernateDelaySec=30min
|
||||
SuspendState=mem
|
||||
'';
|
||||
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_BOOST_ON_BAT = 0;
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
PLATFORM_PROFILE_ON_AC = "performance";
|
||||
PLATFORM_PROFILE_ON_BAT = "low-power";
|
||||
START_CHARGE_THRESH_BAT0 = 75;
|
||||
STOP_CHARGE_THRESH_BAT0 =
|
||||
80; # remove these two if your laptop doesn't support charge thresholds
|
||||
};
|
||||
};
|
||||
powerManagement.enable = true;
|
||||
|
||||
services.power-profiles-daemon.enable = false;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user