mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-05 01:37:24 +08:00
19
minisforum/v3/power.nix
Normal file
19
minisforum/v3/power.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
# From "Optimizing power draw (under Linux)": https://github.com/mudkipme/awesome-minisforum-v3/issues/5#issue-2391536450
|
||||
boot.kernelParams = [ "pcie_aspm.policy=powersupersave" ];
|
||||
systemd.services.enable-aspm = {
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.bash}/bin/bash ${pkgs.callPackage ./src.nix { }}/aspm_v3.sh";
|
||||
Restart = "no";
|
||||
};
|
||||
|
||||
path = with pkgs; [
|
||||
bc
|
||||
pciutils
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user