run the power saving script automatically

auto-flake-update
Yorick van Pelt 2015-09-29 01:09:21 +02:00
parent 863befd57a
commit 92a9d53a44
1 changed files with 14 additions and 0 deletions

View File

@ -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.