git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #5939 from offlinehacker/nixos/containers/containers_in_containers

nixos/containers: make containers in containers possible

commitc0eff1de61dcacaa7023e9800f8e3a8a2c76231a authorJaka Hudoklin <jakahudoklin@gmail.com> dateWed 28 Jan 2015, 16:07 (12 years ago) parentb61d4ac2af3ff5
1 file changed+9−1
nixos/modules/virtualisation/containers.nix+9−1
nixos/modules/virtualisation/containers.nix+9−1
@@ -54,6 +54,14 @@ in
5454 '';
5555 };
5656
57+ boot.enableContainers = mkOption {
58+ type = types.bool;
59+ default = !config.boot.isContainer;
60+ description = ''
61+ Whether to enable support for nixos containers.
62+ '';
63+ };
64+
5765 containers = mkOption {
5866 type = types.attrsOf (types.submodule (
5967 { config, options, name, ... }:
@@ -164,7 +172,7 @@ in
164172 };
165173
166174
167− config = mkIf (!config.boot.isContainer) {
175+ config = mkIf (config.boot.enableContainers) {
168176
169177 systemd.services."container@" =
170178 { description = "Container '%i'";