diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-01-03 05:17:13 +0100 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2020-01-03 05:21:01 +0100 |
commit | c7ade6844f4cb4691ad02065e9395b18b3addcda (patch) | |
tree | acd08e2636350c97d19b2b192ffb6475921153d3 /lib/types.nix | |
parent | 804678f9ea5222bb8a6c011639b0735ca9b8d64c (diff) |
Revert "lib/types: Allow paths as submodule values"
This reverts commit eec83d41e3e7d9ad5bc1086198d972d55bab1203.
This broke hydra evaluation because with this commit submodule values
are allowed to be paths, however the certmgr module uses `either
(submodule ...) path` in its type, meaning it already used paths for
something else which would now be interpreted as a submodule.
Diffstat (limited to 'lib/types.nix')
-rw-r--r-- | lib/types.nix | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/types.nix b/lib/types.nix index 847a4e902cab..de3c4f0d6030 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -376,16 +376,14 @@ rec { else unify (if shorthandOnlyDefinesConfig then { config = value; } else value); allModules = defs: modules ++ imap1 (n: { value, file }: - if isAttrs value || isFunction value then - # Annotate the value with the location of its definition for better error messages - coerce (lib.modules.unifyModuleSyntax file "${toString file}-${toString n}") value - else value + # Annotate the value with the location of its definition for better error messages + coerce (lib.modules.unifyModuleSyntax file "${toString file}-${toString n}") value ) defs; in mkOptionType rec { name = "submodule"; - check = x: isAttrs x || isFunction x || path.check x; + check = x: isAttrs x || isFunction x; merge = loc: defs: (evalModules { modules = allModules defs; |