Compare commits

..

1 commit

Author SHA1 Message Date
172939a617
draft types 2025-06-23 09:35:12 +02:00

View file

@ -4,19 +4,12 @@
... ...
}: }:
let let
inherit (lib) inherit (lib) attrNames mkOption genAttrs;
attrNames
mapAttrs
mkOption
genAttrs
;
inherit (lib.types) inherit (lib.types)
attrsOf attrsOf
attrTag attrTag
deferredModule deferredModule
mergeTypes
submoduleWith submoduleWith
submodule
; ;
runtime-configuration = mkOption { runtime-configuration = mkOption {
description = "The NixOS module of a run-time environment"; description = "The NixOS module of a run-time environment";
@ -28,28 +21,26 @@ let
runtime-environment = attrTag ( runtime-environment = attrTag (
mapAttrs mapAttrs
( (
name: name: options:
option@{ type, ... }: mkOption {
mkOption ( type = submoduleWith {
option modules = [
// { {
type = mergeTypes type (submodule { options = options // {
options.module = mkOption { module = mkOption {
description = "The NixOS module of the run-time environment"; description = "The NixOS module of the run-time environment";
type = deferredModule; type = deferredModule;
default = config.runtime-configurations.${name}; default = config.runtime-configurations.${name};
readOnly = true; readOnly = true;
}; };
}); };
} }
) ];
};
}
) )
{ {
nixos = { nixos = { };
description = "A NixOS instance to deploy to.";
type = submodule {
};
};
} }
); );
application = submoduleWith { application = submoduleWith {