diff --git a/src/nix/modules/composition/images.nix b/src/nix/modules/composition/images.nix index dc885a2..dc93691 100644 --- a/src/nix/modules/composition/images.nix +++ b/src/nix/modules/composition/images.nix @@ -28,6 +28,7 @@ in options = { build.imagesToLoad = lib.mkOption { type = listOf unspecified; + internal = true; description = "List of dockerTools image derivations."; }; }; diff --git a/src/nix/modules/composition/service-info.nix b/src/nix/modules/composition/service-info.nix index 4ac106f..6c66a30 100644 --- a/src/nix/modules/composition/service-info.nix +++ b/src/nix/modules/composition/service-info.nix @@ -5,16 +5,13 @@ */ { config, lib, ... }: let + inherit (lib) mapAttrs filterAttrs; + serviceInfo = - lib.mapAttrs getInfo ( - lib.filterAttrs filterFunction config.services - ); - - filterFunction = _serviceName: service: - # shallow equality suffices for emptiness test - builtins.attrNames service.build.extendedInfo != []; - - getInfo = _serviceName: service: service.build.extendedInfo; + filterAttrs (_k: v: v != {}) + (mapAttrs (_serviceName: service: service.out.extendedInfo) + config.services + ); in { diff --git a/src/nix/modules/service/default-exec.nix b/src/nix/modules/service/default-exec.nix index 299e083..d3c31b3 100644 --- a/src/nix/modules/service/default-exec.nix +++ b/src/nix/modules/service/default-exec.nix @@ -14,6 +14,6 @@ in }; }; config = { - build.extendedInfo.defaultExec = config.service.defaultExec; + out.extendedInfo.defaultExec = config.service.defaultExec; }; } \ No newline at end of file diff --git a/src/nix/modules/service/extended-info.nix b/src/nix/modules/service/extended-info.nix index bb876c7..c6a35f0 100644 --- a/src/nix/modules/service/extended-info.nix +++ b/src/nix/modules/service/extended-info.nix @@ -4,8 +4,11 @@ let inherit (lib.types) attrsOf unspecified; in { + imports = [ + (lib.mkRenamedOptionModule ["build" "extendedInfo"] ["out" "extendedInfo"]) + ]; options = { - build.extendedInfo = mkOption { + out.extendedInfo = mkOption { type = attrsOf unspecified; description = '' Information about a service to include in the Docker Compose file,