git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #55589 from johanot/docker-preloader-mkif-guard

nixos/dockerPreloader: guard the entire implemetation with mkIf on image list

commitb2f3738336a4fce6aaaec9e1b822bdc9ac6e944e authorlewo <lewo@abesis.fr> dateTue 12 Feb 2019, 10:16 (8 years ago) parent6dc46f3302c4df
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!";