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:
Harald Hoyer 2026-05-23 22:32:30 +02:00
parent 2d266d395d
commit 9b811825a6

View file

@ -92,6 +92,23 @@ with lib.metacfg;
interval = "weekly"; 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 = { programs.steam = {
enable = true; enable = true;
}; };