From ee0873c8bfc712f6c98b72487f2173c1453b8d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Tue, 26 May 2026 21:12:31 +0200 Subject: [PATCH] feat: set DefaultTimeoutStopSec to 10s --- lib/mkHost.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/mkHost.nix b/lib/mkHost.nix index 2b8a0d1..047b440 100644 --- a/lib/mkHost.nix +++ b/lib/mkHost.nix @@ -98,6 +98,14 @@ nixpkgs.lib.nixosSystem { ]; } + # cap unit stop timeout so a single misbehaving app (electron, etc) can't + # block poweroff for the full 90s default. user-scope cap is required for + # session-N.scope to honor it. see discourse/49711 + { + systemd.settings.Manager.DefaultTimeoutStopSec = "10s"; + systemd.user.extraConfig = "DefaultTimeoutStopSec=10s"; + } + featureEnableModule hostConfig ]