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