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

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