Squash merge modularization into main
This commit is contained in:
38
hosts/doloro-laptop/laptop.nix
Normal file
38
hosts/doloro-laptop/laptop.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
|
||||
in
|
||||
{
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
PCIE_ASPM_ON_BAT = "powersave";
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "balanced";
|
||||
PCIE_ASPM_ON_AC = "balanced";
|
||||
START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge
|
||||
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
||||
};
|
||||
};
|
||||
# services.tuned.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.upower = {
|
||||
enable = true;
|
||||
};
|
||||
# boot.kernelParams = [ "mem_sleep_default=deep" ];
|
||||
services.logind.settings.Login = {
|
||||
HandleLidSwitch = "suspend-then-hibernate";
|
||||
HandleLidSwitchExternalPower = "ignore";
|
||||
HandleLidSwitchDocked = "ignore";
|
||||
};
|
||||
systemd.sleep.extraConfig = ''
|
||||
HibernateDelaySec=30min
|
||||
SuspendEstimationSec=120
|
||||
'';
|
||||
|
||||
# one of "ignore", "poweroff", "reboot", "halt", "kexec", "suspend", "hibernate", "hybrid-sleep", "suspend-then-hibernate", "lock"
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
powertop.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user