From e3127e8c14bc9942b7b4d9424385097bc1f2af0d Mon Sep 17 00:00:00 2001 From: Bryton Hall Date: Sun, 28 Aug 2022 15:02:49 -0400 Subject: [PATCH] allow docker image/tag to be empty string This is a work-around to allow evaluation for docs. It shouldn't have any real effect but should be properyl implemented at some point. --- modules/docker.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/docker.nix b/modules/docker.nix index c033dff..7a35af4 100644 --- a/modules/docker.nix +++ b/modules/docker.nix @@ -34,13 +34,13 @@ in { name = mkOption { description = "Desired docker image name"; type = types.str; - default = builtins.unsafeDiscardStringContext config.image.imageName; + default = if config.image != null then builtins.unsafeDiscardStringContext config.image.imageName else ""; }; tag = mkOption { description = "Desired docker image tag"; type = types.str; - default = builtins.unsafeDiscardStringContext config.image.imageTag; + default = if config.image != null then builtins.unsafeDiscardStringContext config.image.imageTag else ""; }; registry = mkOption {