shell enhancements and cpu freq temp fix
This commit is contained in:
parent
0fa4e8c6c0
commit
4a06cf60dd
4 changed files with 44 additions and 16 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }: {
|
||||
{ pkgs, resume-dev, ... }: {
|
||||
powerManagement.powertop.enable = true;
|
||||
|
||||
services = {
|
||||
|
|
@ -6,8 +6,8 @@
|
|||
#ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"
|
||||
ACTION=="add", SUBSYSTEM=="pci", TEST=="power/control", ATTR{power/control}="auto"
|
||||
SUBSYSTEM=="power_supply", ACTION=="change", RUN+="${pkgs.writeShellScript "battery-thresholds" ''
|
||||
echo 80 > /sys/class/power_supply/BAT1/charge_control_start_threshold || true
|
||||
echo 85 > /sys/class/power_supply/BAT1/charge_control_end_threshold || true
|
||||
echo 80 > /sys/class/power_supply/BAT*/charge_control_start_threshold || true
|
||||
echo 85 > /sys/class/power_supply/BAT*/charge_control_end_threshold || true
|
||||
''}"
|
||||
'';
|
||||
upower = {
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
percentageCritical = 15;
|
||||
percentageAction = 10;
|
||||
usePercentageForPolicy = true;
|
||||
allowRiskyCriticalPowerAction = true;
|
||||
criticalPowerAction = "HybridSleep";
|
||||
allowRiskyCriticalPowerAction = false;
|
||||
criticalPowerAction = if resume-dev != "" then "Hibernate" else "PowerOff";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue