modular-flake/nix/output/packages.nix

20 lines
426 B
Nix

{ lib, ... }:
with lib;
{
config.outputKinds = [
(
{ hasSystem, ... }:
optionalAttrs hasSystem {
options = {
packages = mkOption {
type = with types; attrsOf package;
description = "Executed by `nix build .#<name>`";
};
};
outputs = { config, system, ... }: {
packages.${system} = config.packages;
};
}
)
];
}