feat(amd): suspend the host on a nightly schedule
Add a systemd timer that suspends the amd machine at 22:00 each day so it powers down predictably overnight without needing a manual shutdown step.
This commit is contained in:
parent
2d266d395d
commit
9b811825a6
1 changed files with 17 additions and 0 deletions
|
|
@ -92,6 +92,23 @@ with lib.metacfg;
|
|||
interval = "weekly";
|
||||
};
|
||||
|
||||
systemd.services.suspend-at-2200 = {
|
||||
description = "Suspend the system at 22:00";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.systemd}/bin/systemctl suspend";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.timers.suspend-at-2200 = {
|
||||
description = "Daily suspend at 22:00";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "22:00";
|
||||
Unit = "suspend-at-2200.service";
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue