git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/dockerPreloader: guard the entire implemetation with mkIf on image list
commit302c4df41dafb9cf2aef963afe94b3d5bce66f63 authorJohan Thomsen <jth@dbc.dk> dateMon 11 Feb 2019, 23:35 (8 years ago) parent07208e7
1 file changed+2−3
nixos/modules/virtualisation/docker-preloader.nix+2−3
nixos/modules/virtualisation/docker-preloader.nix+2−3
@@ -78,12 +78,11 @@ in
7878 };
7979 };
8080
81− config = {
81+ config = mkIf (cfg.dockerPreloader.images != []) {
8282 assertions = [{
8383 # If docker.storageDriver is null, Docker choose the storage
8484 # driver. So, in this case, we cannot be sure overlay2 is used.
85− assertion = cfg.dockerPreloader.images == []
86− || cfg.docker.storageDriver == "overlay2"
85+ assertion = cfg.docker.storageDriver == "overlay2"
8786 || cfg.docker.storageDriver == "overlay"
8887 || cfg.docker.storageDriver == null;
8988 message = "The Docker image Preloader only works with overlay2 storage driver!";