run the power saving script automatically
parent
863befd57a
commit
92a9d53a44
|
@ -45,6 +45,20 @@
|
|||
wget
|
||||
];
|
||||
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
|
||||
systemd.services.powerswitch = {
|
||||
enable = true;
|
||||
wantedBy = [ "multi-user.target" "suspend.target" ];
|
||||
after = [ "suspend.target" "display-manager.service" ];
|
||||
description = "Run powerswitch sometimes";
|
||||
path = [ pkgs.hdparm pkgs.iw pkgs.gawk pkgs.kmod config.system.sbin.modprobe ];
|
||||
preStart = "sleep 2s";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''/etc/powerdown/powerswitch'';
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: cups.
|
||||
|
||||
|
|
Loading…
Reference in New Issue