mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
nixos/containers: warn if containers are used but disabled
This is a follow-up to 8dfe8e447e
.
This commit is contained in:
parent
b69f44d251
commit
1c404d2584
1 changed files with 126 additions and 120 deletions
|
@ -771,8 +771,13 @@ in
|
|||
};
|
||||
|
||||
|
||||
config = mkIf (config.boot.enableContainers) (let
|
||||
config = mkMerge [
|
||||
{
|
||||
warnings = optional (!config.boot.enableContainers && config.containers != {})
|
||||
"containers.<name> is used, but boot.enableContainers is false. To use containers.<name>, set boot.enableContainers to true.";
|
||||
}
|
||||
|
||||
(mkIf (config.boot.enableContainers) (let
|
||||
unit = {
|
||||
description = "Container '%i'";
|
||||
|
||||
|
@ -905,7 +910,8 @@ in
|
|||
"tap"
|
||||
"tun"
|
||||
];
|
||||
});
|
||||
}))
|
||||
];
|
||||
|
||||
meta.buildDocsInSandbox = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue