31 lines
563 B
Nix
31 lines
563 B
Nix
{ lib, ... }:
|
|
with lib;
|
|
{
|
|
config.outputKinds = [
|
|
(_: {
|
|
options = {
|
|
lib = mkOption {
|
|
type = with types; anything;
|
|
description = ''
|
|
Exported from the flake at `.lib` and `.lib.<system>` respectively
|
|
'';
|
|
};
|
|
};
|
|
outputs =
|
|
{
|
|
config,
|
|
hasSystem,
|
|
system,
|
|
...
|
|
}:
|
|
if hasSystem then
|
|
{
|
|
lib.${system} = config.lib;
|
|
}
|
|
else
|
|
{
|
|
lib = config.lib;
|
|
};
|
|
})
|
|
];
|
|
}
|