aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-08-31 10:04:20 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-08-31 10:04:20 +0200
commitad1d58c6227abf2a9c80311eb09166a532384ed2 (patch)
tree852498ff298f9b01c0d2c8b4c883da1a00912260 /nixos/modules/virtualisation
parentebe4fd146b29c92fb59f243f75e46afc9f1a9048 (diff)
parentfc74ba8291a8a93cba428de6bc2e7c8c7f9330f4 (diff)
Merge staging-next into staging
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/containers.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix
index 9fe577bd83e..510b91904c5 100644
--- a/nixos/modules/virtualisation/containers.nix
+++ b/nixos/modules/virtualisation/containers.nix
@@ -256,6 +256,10 @@ let
RestartForceExitStatus = "133";
SuccessExitStatus = "133";
+ # Some containers take long to start
+ # especially when you automatically start many at once
+ TimeoutStartSec = cfg.timeoutStartSec;
+
Restart = "on-failure";
Slice = "machine.slice";
@@ -423,6 +427,7 @@ let
extraVeths = {};
additionalCapabilities = [];
ephemeral = false;
+ timeoutStartSec = "15s";
allowedDevices = [];
hostAddress = null;
hostAddress6 = null;
@@ -595,6 +600,18 @@ in
'';
};
+ timeoutStartSec = mkOption {
+ type = types.str;
+ default = "1min";
+ description = ''
+ Time for the container to start. In case of a timeout,
+ the container processes get killed.
+ See <citerefentry><refentrytitle>systemd.time</refentrytitle>
+ <manvolnum>7</manvolnum></citerefentry>
+ for more information about the format.
+ '';
+ };
+
bindMounts = mkOption {
type = with types; loaOf (submodule bindMountOpts);
default = {};