fix damocles cgroup broken after sleep with network switch

This commit is contained in:
müde 2026-04-24 20:55:18 +02:00
parent e71e56a30d
commit f2ed78747c
2 changed files with 13 additions and 2 deletions

View file

@ -69,7 +69,12 @@
# Global DefaultTimeoutStopSec is 10s (modern-desktop.nix), which kills systemd-nspawn
# before it finishes halting, leaving cgroups busy and breaking restarts.
systemd.services."container@damocles".serviceConfig.TimeoutStopSec = "60s";
systemd.services."container@damocles".serviceConfig = {
TimeoutStopSec = "60s";
# After a SIGKILL of nspawn, the kernel needs a moment to reap its cgroups.
# Without this, the immediate restart attempt fails with "Device or resource busy".
RestartSec = "5s";
};
boot.enableContainers = true;
virtualisation.containers.enable = true;