feat(systemd): add shutdown/boot hang diagnostics module

Shutdown stalls are hard to debug because journald is torn down mid-way,
so late hangs never reach the journal. `modules/shutdown-debug.nix`
exposes `local.shutdownDebug.*`: verbose systemd logging routed to kmsg
(recoverable from pstore after a forced power-off), an opt-in tty9 debug
shell, and a shortened `DefaultTimeoutStopSec` preset (system + user) so
a hung unit is killed and logged in seconds instead of spinning at 90s.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-12 14:47:30 +02:00
parent 98eb0f87ba
commit de6c3993cc
3 changed files with 98 additions and 0 deletions
+2
View File
@@ -5,6 +5,8 @@
{ config, lib, pkgs, ... }:
{
imports = [ ./shutdown-debug.nix ];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Deduplicate identical store paths via hardlinks.
nix.settings.auto-optimise-store = true;