From 2af3ff52c2abc27a1e74e43a59d1962a1b1757b9 Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Sat, 24 Jan 2015 23:06:00 +0100 Subject: nixos/containers: make containers in containers possible --- nixos/modules/virtualisation/containers.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'nixos/modules') diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix index 075ec0ea2277..c461cf8c00cb 100644 --- a/nixos/modules/virtualisation/containers.nix +++ b/nixos/modules/virtualisation/containers.nix @@ -54,6 +54,14 @@ in ''; }; + boot.enableContainers = mkOption { + type = types.bool; + default = !config.boot.isContainer; + description = '' + Whether to enable support for nixos containers. + ''; + }; + containers = mkOption { type = types.attrsOf (types.submodule ( { config, options, name, ... }: @@ -164,7 +172,7 @@ in }; - config = mkIf (!config.boot.isContainer) { + config = mkIf (config.boot.enableContainers) { systemd.services."container@" = { description = "Container '%i'"; -- cgit 1.4.1