diff options
author | Johan Thomsen <jth@dbc.dk> | 2019-02-11 23:35:25 +0100 |
---|---|---|
committer | Johan Thomsen <jth@dbc.dk> | 2019-02-11 23:35:25 +0100 |
commit | 302c4df41dafb9cf2aef963afe94b3d5bce66f63 (patch) | |
tree | 33ba36712964142258b2df6596275625c6a7489c /nixos/modules/virtualisation | |
parent | 07208e7a0b1a6b515552c9150cb7c400a9594521 (diff) | |
download | nixpkgs-302c4df41dafb9cf2aef963afe94b3d5bce66f63.tar nixpkgs-302c4df41dafb9cf2aef963afe94b3d5bce66f63.tar.gz nixpkgs-302c4df41dafb9cf2aef963afe94b3d5bce66f63.tar.bz2 nixpkgs-302c4df41dafb9cf2aef963afe94b3d5bce66f63.tar.lz nixpkgs-302c4df41dafb9cf2aef963afe94b3d5bce66f63.tar.xz nixpkgs-302c4df41dafb9cf2aef963afe94b3d5bce66f63.tar.zst nixpkgs-302c4df41dafb9cf2aef963afe94b3d5bce66f63.zip |
nixos/dockerPreloader: guard the entire implemetation with mkIf on image list
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/docker-preloader.nix | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nixos/modules/virtualisation/docker-preloader.nix b/nixos/modules/virtualisation/docker-preloader.nix index faa94f53d98..6ab83058dee 100644 --- a/nixos/modules/virtualisation/docker-preloader.nix +++ b/nixos/modules/virtualisation/docker-preloader.nix @@ -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!"; |