mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-14 13:39:15 +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 = {
|
unit = {
|
||||||
description = "Container '%i'";
|
description = "Container '%i'";
|
||||||
|
|
||||||
|
@ -905,7 +910,8 @@ in
|
||||||
"tap"
|
"tap"
|
||||||
"tun"
|
"tun"
|
||||||
];
|
];
|
||||||
});
|
}))
|
||||||
|
];
|
||||||
|
|
||||||
meta.buildDocsInSandbox = false;
|
meta.buildDocsInSandbox = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue