64 lines
3.2 KiB
Nix
64 lines
3.2 KiB
Nix
{
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [ ];
|
|
|
|
config = {
|
|
environment.systemPackages = with pkgs; [
|
|
powertop
|
|
];
|
|
|
|
# pcie_aspm=force pcie_aspm.policy=powersupersave :: Enable PCIe active state power management for power reduction.
|
|
# nowatchdog :: Disable watchdog for power savings (related to disable_sp5100_watchdog above).
|
|
boot.kernelParams = [
|
|
"pcie_aspm=force"
|
|
# "pcie_aspm.policy=powersupersave"
|
|
"nowatchdog"
|
|
];
|
|
|
|
systemd.tmpfiles.rules = [
|
|
"w- /sys/firmware/acpi/platform_profile - - - - low-power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy4/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy5/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy6/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy7/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy8/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy9/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy10/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy11/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy12/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy13/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy14/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpufreq/policy15/energy_performance_preference - - - - power"
|
|
"w- /sys/devices/system/cpu/cpu0/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu1/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu2/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu3/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu4/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu5/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu6/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu7/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu8/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu9/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu10/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu11/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu12/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu13/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu14/cpufreq/boost - - - - 0"
|
|
"w- /sys/devices/system/cpu/cpu15/cpufreq/boost - - - - 0"
|
|
];
|
|
|
|
boot.extraModprobeConfig = ''
|
|
# Sound power-saving was causing chat notifications to be inaudible.
|
|
# options snd_hda_intel power_save=1
|
|
'';
|
|
};
|
|
}
|