nixos/dockerPreloader: guard the entire implemetation with mkIf on image list
This commit is contained in:
parent
07208e7a0b
commit
302c4df41d
@ -78,12 +78,11 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = mkIf (cfg.dockerPreloader.images != []) {
|
||||||
assertions = [{
|
assertions = [{
|
||||||
# If docker.storageDriver is null, Docker choose the storage
|
# If docker.storageDriver is null, Docker choose the storage
|
||||||
# driver. So, in this case, we cannot be sure overlay2 is used.
|
# driver. So, in this case, we cannot be sure overlay2 is used.
|
||||||
assertion = cfg.dockerPreloader.images == []
|
assertion = cfg.docker.storageDriver == "overlay2"
|
||||||
|| cfg.docker.storageDriver == "overlay2"
|
|
||||||
|| cfg.docker.storageDriver == "overlay"
|
|| cfg.docker.storageDriver == "overlay"
|
||||||
|| cfg.docker.storageDriver == null;
|
|| cfg.docker.storageDriver == null;
|
||||||
message = "The Docker image Preloader only works with overlay2 storage driver!";
|
message = "The Docker image Preloader only works with overlay2 storage driver!";
|
||||||
|
Loading…
Reference in New Issue
Block a user