flake-utils
flake-utils copied to clipboard
Add convenient generic attribute
Doing
{
lib = {
test = 1;
};
} // eachDefaultSystem (system: {
packages = { /* ... */ };
})
is really inconvenient. This lets you do
eachDefaultSystem (system: {
lib.generic = {
test = 1;
};
packages = { /* ... */ };
})
Agreed with the observation that the current situation could be better.
The proposed solution is not super discoverable and also re-instantiates the generic bits multiple times even if a single one will be used in the end.
What do you think of this instead?
eachDefaultSystem2 {
generic = { lib.test = 1; };
eachSystem = system: {
packages = { /* ... */ };
};
}
Good idea!
@jD91mZM2: pushed another proposal. I think that generic should just override the top-level.
https://www.redox-os.org/news/open-source-mental-health/