fix(#2284): replace nixos-container kill with machinectl kill SIGKILL

nixos-container has no kill verb. The KillContainer priv request was
calling nixos-container kill which always fails. Replace with:

  machinectl kill <name> --signal=SIGKILL

which sends SIGKILL to all processes in the container — the correct
semantics for a forced shutdown (called after graceful stop has been
attempted). Add a machinectl_run helper alongside container_run so
callers stay consistent.
This commit is contained in:
atlas 2026-07-08 22:47:36 +02:00
commit fa944d1213
2 changed files with 35 additions and 2 deletions

View file

@ -230,7 +230,8 @@ pub enum PrivRequest {
/// `nixos-container stop <name>`
StopContainer { name: String },
/// `nixos-container kill <name>`
/// `machinectl kill <name> --signal=SIGKILL` — force-kills all processes
/// in the container. nixos-container has no kill verb.
KillContainer { name: String },
/// `nixos-container update <name> --flake <flake_ref>`