From 343b4f155e60d7a36f8525b500ea8a859c7a8657 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 23 Jul 2025 15:25:47 +0200 Subject: [PATCH] Set power policy to always turn on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In all machines, as soon as we recover the power, turn the machine back on. We cannot rely on the previous state as we will shut them down before the power is cut to prevent damage on the power supply monitoring circuit. Reviewed-by: Aleix Roca Nonell Reviewed-by: Aleix Boné --- m/common/base.nix | 1 + m/common/base/always-power-on.nix | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 m/common/base/always-power-on.nix diff --git a/m/common/base.nix b/m/common/base.nix index bb0e4e2..cdd1dc1 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/always-power-on.nix ./base/august-shutdown.nix ./base/boot.nix ./base/env.nix diff --git a/m/common/base/always-power-on.nix b/m/common/base/always-power-on.nix new file mode 100644 index 0000000..cdee12c --- /dev/null +++ b/m/common/base/always-power-on.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ../../module/power-policy.nix + ]; + + # Turn on as soon as we have power + power.policy = "always-on"; +}