From dd6dfde5755469a2ba0cfe87f3d4854287054f5b Mon Sep 17 00:00:00 2001 From: mokasin Date: Mon, 12 Jan 2015 18:12:33 +0100 Subject: [PATCH] Add auto-start option to containers. --- nixos/modules/virtualisation/containers.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix index 994a00fb028..3b7f3e248d5 100644 --- a/nixos/modules/virtualisation/containers.nix +++ b/nixos/modules/virtualisation/containers.nix @@ -111,6 +111,13 @@ in ''; }; + autoStart = mkOption { + type = types.bool; + default = false; + description = '' + Wether the container is automatically started at boot-time. + ''; + }; }; config = mkMerge @@ -305,6 +312,9 @@ in LOCAL_ADDRESS=${cfg.localAddress} ''} ''} + ${optionalString cfg.autoStart '' + AUTO_START=1 + ''} ''; }) config.containers;