typst-nix/lib/output.nix
2026-10-21 13:02:38 +01:00

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;
};
})
];
}