Skip to content

Commit 4b79554

Browse files
committed
dont merge modules and resolve
1 parent 0fb20e5 commit 4b79554

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

nix/types.nix

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,36 +93,31 @@ let
9393
options.modules = lib.mkOption {
9494
internal = true;
9595
visible = false;
96+
readOnly = true;
9697
description = "resolved modules from this aspect";
9798
# Use a custom type that always takes the last value (no merging)
9899
type = lib.types.mkOptionType {
99100
name = "aspectModules";
100101
description = "resolved modules from aspect";
101-
merge = _loc: _defs: lib.mapAttrs (class: _: config.resolve { inherit class; }) config;
102+
merge = _loc: _defs: null;
102103
check = _: true;
103104
};
104-
default = lib.mapAttrs (class: _: config.resolve { inherit class; }) config;
105+
apply = _: lib.mapAttrs (class: _: config.resolve { inherit class; }) config;
105106
};
106107
options.resolve = lib.mkOption {
107108
internal = true;
108109
visible = false;
110+
readOnly = true;
109111
description = "function to resolve a module from this aspect";
110112
# Use a custom type that always takes the last value (no merging)
111113
type = lib.types.mkOptionType {
112114
name = "aspectResolve";
113115
description = "resolve function for aspect";
114-
merge =
115-
_loc: _defs:
116-
{
117-
class,
118-
aspect-chain ? [ ],
119-
}:
120-
resolve class aspect-chain (config {
121-
inherit class aspect-chain;
122-
});
116+
merge = _loc: _defs: null;
123117
check = _: true;
124118
};
125-
default =
119+
apply =
120+
_:
126121
{
127122
class,
128123
aspect-chain ? [ ],

0 commit comments

Comments
 (0)