diff --git a/tidepool/src/lib/types.nix b/tidepool/src/lib/types.nix index b706ebf..039a21f 100644 --- a/tidepool/src/lib/types.nix +++ b/tidepool/src/lib/types.nix @@ -60,41 +60,14 @@ in options = global.config.packages.context.options; }; + settings = lib.types.submodule { + options = global.config.packages.settings.options; + }; + platform = lib.types.coerce lib.types.string lib.systems.withBuildInfo lib.systems.types.platformWithBuildInfo; - # builder = lib.types.submodules.portable { - # name = "Builder"; - # module = ( - # { config, name ? "builder" }: - # { - # freeform = lib.types.any; - # - # options = { - # name = lib.options.create { - # description = "The name of the builder."; - # type = lib.types.string; - # default = lib.attrs.when (name != "builder") { - # value = name; - # }; - # writable = false; - # }; - # - # build = lib.options.create { - # description = "The build function which takes a package definition and creates a derivation."; - # type = lib.types.function lib.types.artifact; - # }; - # - # settings = lib.options.create { - # description = "The settings for the builder."; - # type = lib.types.submodule ({ config }: {}); - # default.value = { }; - # }; - # }; - # } - # ); - # }; builder = let normalize = @@ -851,8 +824,14 @@ in context = lib.options.create { description = "The context information that the package provides."; - default.value = { }; type = lib.types.context; + default.value = { }; + }; + + settings = lib.options.create { + description = "The settings for the package."; + type = lib.types.settings; + default.value = { }; }; hooks = lib.options.create { diff --git a/tidepool/src/packages/default.nix b/tidepool/src/packages/default.nix index 7cacaf0..f92eeaf 100644 --- a/tidepool/src/packages/default.nix +++ b/tidepool/src/packages/default.nix @@ -24,6 +24,12 @@ in default.value = { }; type = lib.types.attrs.of lib.types.option; }; + + settings.options = lib.options.create { + description = "The available settings for packages."; + default.value = { }; + type = lib.types.attrs.of lib.types.option; + }; }; }; };