Merge pull request #55589 from johanot/docker-preloader-mkif-guard

nixos/dockerPreloader: guard the entire implemetation with mkIf on image list
This commit is contained in:
lewo 2019-02-12 10:16:21 +01:00 committed by GitHub
commit b2f3738336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -78,12 +78,11 @@ in
};
};
config = {
config = mkIf (cfg.dockerPreloader.images != []) {
assertions = [{
# If docker.storageDriver is null, Docker choose the storage
# driver. So, in this case, we cannot be sure overlay2 is used.
assertion = cfg.dockerPreloader.images == []
|| cfg.docker.storageDriver == "overlay2"
assertion = cfg.docker.storageDriver == "overlay2"
|| cfg.docker.storageDriver == "overlay"
|| cfg.docker.storageDriver == null;
message = "The Docker image Preloader only works with overlay2 storage driver!";