mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
nixos/containers: make containers in containers possible
This commit is contained in:
parent
c457bbb2bb
commit
2af3ff52c2
@ -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'";
|
||||
|
Loading…
Reference in New Issue
Block a user