feat: update droppie shutdown, default to UTC

This commit is contained in:
Benjamin Bädorf 2023-11-06 21:50:28 +01:00
parent 540736c3ba
commit 2fbaa24cb5
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
3 changed files with 8 additions and 5 deletions

View file

@ -1,10 +1,10 @@
{pkgs, ...}: let {pkgs, ...}: let
shutdownWaitMinutes = 10; shutdownWaitMinutes = 10;
shutdownScript = pkgs.writeShellScriptBin "shutdown-wait" '' shutdownScript = pkgs.writeShellScriptBin "shutdown-wait" ''
ssh_login_active="$(ps aux | grep "sshd: yule" | grep -v grep)"
if [ -n "''${ssh_login_active}" ] && [ "''${ssh_login_active}" != "0" ]; then
if [ -n "''${running}" ] && [ "''${running}" = "yes" ]; then echo "There is still an active ssh connection"
echo "backups are still running"
exit 1 exit 1
fi fi
@ -26,7 +26,7 @@ in {
systemd.timers."shutdown-after-backup" = { systemd.timers."shutdown-after-backup" = {
enable = true; enable = true;
timerConfig = { timerConfig = {
OnCalendar = "*-*-* 02..09:00,15,30,45:00 Etc/UTC"; OnCalendar = "*-*-* 02..09:05,20,35,50:00 Etc/UTC";
}; };
wantedBy = ["timers.target"]; wantedBy = ["timers.target"];
partOf = ["shutdown-after-backup.service"]; partOf = ["shutdown-after-backup.service"];

View file

@ -7,7 +7,7 @@
with lib; { with lib; {
config = { config = {
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Etc/UTC";
# Select internationalisation properties. # Select internationalisation properties.
console = { console = {

View file

@ -19,6 +19,9 @@ in {
owner = psCfg.user.name; owner = psCfg.user.name;
}; };
# Set your time zone.
time.timeZone = "Europe/Berlin";
pub-solar = { pub-solar = {
user = { user = {
name = "b12f"; name = "b12f";