From d988ef2effa5006b19421a777300d2f1fbf21bc1 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 18 Jul 2024 18:01:45 +0200 Subject: [PATCH] Program shutdown for August 2nd for all machines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Aleix Boné --- m/common/base.nix | 1 + m/common/base/august-shutdown.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 m/common/base/august-shutdown.nix diff --git a/m/common/base.nix b/m/common/base.nix index f6b74ea..bb0e4e2 100644 --- a/m/common/base.nix +++ b/m/common/base.nix @@ -3,6 +3,7 @@ # Includes the basic configuration for an Intel server. imports = [ ./base/agenix.nix + ./base/august-shutdown.nix ./base/boot.nix ./base/env.nix ./base/fs.nix diff --git a/m/common/base/august-shutdown.nix b/m/common/base/august-shutdown.nix new file mode 100644 index 0000000..5eaa803 --- /dev/null +++ b/m/common/base/august-shutdown.nix @@ -0,0 +1,13 @@ +{ + # Shutdown all machines on August 2nd at 11:00 AM, so we can protect the + # hardware from spurious electrical peaks on the yearly electrical cut for + # manteinance that starts on August 4th. + systemd.timers.august-shutdown = { + description = "Shutdown on August 2nd for maintenance"; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "*-08-02 11:00:00"; + Unit = "systemd-poweroff.service"; + }; + }; +}