summary refs log tree commit diff
path: root/nixos/modules/virtualisation/containers.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-24 12:27:32 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-24 12:28:41 +0200
commit0263a8f86064a9d02e8b4eb8fa8839dfec2b087f (patch)
treec1fee4a14ffc7a5b684851bcac44e25fe06cc4f6 /nixos/modules/virtualisation/containers.nix
parent891657b634092a110e15947623e750f1e7200ce4 (diff)
downloadnixpkgs-0263a8f86064a9d02e8b4eb8fa8839dfec2b087f.tar
nixpkgs-0263a8f86064a9d02e8b4eb8fa8839dfec2b087f.tar.gz
nixpkgs-0263a8f86064a9d02e8b4eb8fa8839dfec2b087f.tar.bz2
nixpkgs-0263a8f86064a9d02e8b4eb8fa8839dfec2b087f.tar.lz
nixpkgs-0263a8f86064a9d02e8b4eb8fa8839dfec2b087f.tar.xz
nixpkgs-0263a8f86064a9d02e8b4eb8fa8839dfec2b087f.tar.zst
nixpkgs-0263a8f86064a9d02e8b4eb8fa8839dfec2b087f.zip
NixOS containers: Use exit status 133 for reboots
Diffstat (limited to 'nixos/modules/virtualisation/containers.nix')
-rw-r--r--nixos/modules/virtualisation/containers.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix
index 292b96e6eb2..ca3de4089d2 100644
--- a/nixos/modules/virtualisation/containers.nix
+++ b/nixos/modules/virtualisation/containers.nix
@@ -267,9 +267,12 @@ in
 
           NotifyAccess = "all";
 
-          # Note that on reboot, systemd-nspawn returns 10, so this
+          # Note that on reboot, systemd-nspawn returns 133, so this
           # unit will be restarted. On poweroff, it returns 0, so the
           # unit won't be restarted.
+          RestartForceExitStatus = "133";
+          SuccessExitStatus = "133";
+
           Restart = "on-failure";
 
           # Hack: we don't want to kill systemd-nspawn, since we call