Skip to content

Commit 1e2113f

Browse files
committed
use providerType in aspects
1 parent b081123 commit 1e2113f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

nix/types.nix

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let
55
aspectsType = lib.types.submodule (
66
{ config, ... }:
77
{
8-
freeformType = lib.types.attrsOf (lib.types.either aspectSubmoduleAttrs providerType);
8+
freeformType = lib.types.attrsOf providerType;
99
config._module.args.aspects = config;
1010
}
1111
);
@@ -30,7 +30,7 @@ let
3030
);
3131

3232
functionProviderType = lib.types.either functionToAspect (lib.types.functionTo providerType);
33-
providerType = lib.types.either functionProviderType aspectSubmodule;
33+
providerType = lib.types.either aspectSubmoduleAttrs functionProviderType;
3434

3535
aspectSubmoduleAttrs = lib.types.addCheck aspectSubmodule (
3636
m: (!builtins.isFunction m) || (isAspectSubmoduleFn m)
@@ -78,13 +78,7 @@ let
7878
options.provides = lib.mkOption {
7979
description = "Providers of aspect for other aspects";
8080
default = { };
81-
type = lib.types.submodule (
82-
{ config, ... }:
83-
{
84-
freeformType = lib.types.attrsOf providerType;
85-
config._module.args.provides = config;
86-
}
87-
);
81+
type = aspectsType;
8882
};
8983
options.__functor = lib.mkOption {
9084
internal = true;

0 commit comments

Comments
 (0)