2 Commits

Author SHA1 Message Date
c50d24062f Set power policy to always turn on
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.
2025-07-23 16:58:09 +02:00
b8d2a6ac30 Add NixOS module to control power policy 2025-07-23 16:58:05 +02:00

View File

@@ -8,7 +8,7 @@ in
{
options = {
power.policy = mkOption {
type = lib.types.nullOr (types.enum [ "always-on" "previous" "always-off" ]);
type = types.nullOr (types.enum [ "always-on" "previous" "always-off" ]);
default = null;
description = "Set power policy to use via IPMI.";
};
@@ -23,6 +23,8 @@ in
Type = "oneshot";
Restart = "on-failure";
RestartSec = "5s";
StartLimitBurst = "10";
StartLimitIntervalSec = "10m";
};
};
};