From 9b811825a64403303ce688d620900850772aab28 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Sat, 23 May 2026 22:32:30 +0200 Subject: [PATCH] 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. --- systems/x86_64-linux/amd/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/systems/x86_64-linux/amd/default.nix b/systems/x86_64-linux/amd/default.nix index d727fcb..e95fbe2 100644 --- a/systems/x86_64-linux/amd/default.nix +++ b/systems/x86_64-linux/amd/default.nix @@ -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; };