Your one-stop-cake-shop for everything Freshly Baked has to offer

feat(umber): automatically shutdown

The power to umber turns off at midnight. Therefore, we should shut it
down beforehand to make sure it shuts down cleanly

authored by a.starrysky.fyi and committed by

Tangled f19e433a 8921ee6c

+26
+26
packetmix/systems/umber/auto-shutdown.nix
··· 1 + # SPDX-FileCopyrightText: 2025 FreshlyBakedCake 2 + # 3 + # SPDX-License-Identifier: MIT 4 + 5 + { pkgs, ... }: 6 + { 7 + systemd.timers."auto-shutdown" = { 8 + wantedBy = [ "timers.target" ]; 9 + timerConfig = { 10 + OnCalendar = "* *-*-* 23:55:00 Etc/UTC"; 11 + Persistent = false; 12 + Unit = "auto-shutdown.service"; 13 + }; 14 + }; 15 + 16 + systemd.services."auto-shutdown" = { 17 + script = '' 18 + ${pkgs.systemd}/bin/systemctl poweroff 19 + ''; 20 + serviceConfig = { 21 + RemainAfterExit = true; 22 + Type = "oneshot"; 23 + User = "root"; 24 + }; 25 + }; 26 + }