Add custom merge error for unknown flake output attrs

This commit is contained in:
Robert Hensing 2025-01-06 06:48:17 +01:00
parent f2f7418ce0
commit 21ac911b1d

View file

@ -10,7 +10,23 @@ in
flake = mkOption {
type = types.submoduleWith {
modules = [
{ freeformType = types.lazyAttrsOf types.raw; }
{
freeformType =
types.lazyAttrsOf
(types.unique
{
message = ''
No option has been declared for this flake output attribute, so its definitions can't be merged automatically.
Possible solutions:
- Load a module that defines this flake output attribute
Many modules are listed at https://flake.parts
- Declare an option for this flake output attribute
- Make sure the output attribute is spelled correctly
- Define the value only once, with a single definition in a single module
'';
}
types.raw);
}
];
};
description = ''