commit
43c436af27
@ -659,6 +659,7 @@
|
|||||||
./tasks/scsi-link-power-management.nix
|
./tasks/scsi-link-power-management.nix
|
||||||
./tasks/swraid.nix
|
./tasks/swraid.nix
|
||||||
./tasks/trackpoint.nix
|
./tasks/trackpoint.nix
|
||||||
|
./tasks/powertop.nix
|
||||||
./testing/service-runner.nix
|
./testing/service-runner.nix
|
||||||
./virtualisation/container-config.nix
|
./virtualisation/container-config.nix
|
||||||
./virtualisation/containers.nix
|
./virtualisation/containers.nix
|
||||||
|
27
nixos/modules/tasks/powertop.nix
Normal file
27
nixos/modules/tasks/powertop.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.powerManagment.powertop;
|
||||||
|
in {
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options.powerManagment.powertop.enable = mkEnableOption "powertop auto tuning on startup";
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = mkIf (cfg.enable) {
|
||||||
|
systemd.services = {
|
||||||
|
powertop = {
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
description = "Powertop tunings";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = "yes";
|
||||||
|
ExecStart = "${pkgs.powertop}/bin/powertop --auto-tune";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user