Unverified Commit 1f33d804 authored by Robert Hensing's avatar Robert Hensing Committed by GitHub
Browse files

Merge pull request #270220 from NixOS/backport-269970-to-release-23.11

[Backport release-23.11] nixos/containers: warn if containers are used but disabled
parents ed60d66d d015a0fc
Loading
Loading
Loading
Loading
+127 −121
Original line number Diff line number Diff line
@@ -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;
}