git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/containers: make containers in containers possible
commit2af3ff52c2abc27a1e74e43a59d1962a1b1757b9 authorJaka Hudoklin <jakahudoklin@gmail.com> dateSat 24 Jan 2015, 23:06 (12 years ago) parentc457bbb
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'";