feat(nixos): reboot physical hosts on hard freeze or panic (#528)

Assisted-by: DeepSeek Harness (claude-opus-5-5)
This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-11-17 19:37:29 +08:00
1 parent 8604bbb214
commit bd2b8594f7
5 files changed
+23 -9

No files matched your search

+4 -1
View File
@@ -1,6 +1,9 @@
{ mylib, ... }:
{
imports = mylib.scanPaths ./. ++ [ ../power.nix ];
imports = mylib.scanPaths ./. ++ [
../power.nix
../watchdog.nix
];
# Power-supply reporting for the desktop shell: the laptop's battery, and
# peripheral batteries on a desktop. UPower only reports state; unlike TuneD it
+6
View File
@@ -0,0 +1,6 @@
{
# Reboot physical hosts after a hard freeze or kernel panic instead of waiting for a power cycle;
# a host without a hardware watchdog only logs that /dev/watchdog is missing.
systemd.settings.Manager.RuntimeWatchdogSec = "30s";
boot.kernel.sysctl."kernel.panic" = 20; # seconds; the default 0 hangs forever
}