1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-04 08:49:43 +01:00
nixos-hardware/minisforum/v3/power.nix
eum3l d3986e7885 minisforum/v3: init
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2024-11-02 04:05:17 +00:00

19 lines
478 B
Nix

{ 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
];
};
}