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

Merge pull request #269970 from emilylange/nixos-containers-warning

nixos/containers: warn if containers are used but disabled
parents 0efe7d42 1c404d25
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;
}