Skip to content

den.lib (deprecated)

Wraps an aspect with a __functor that filters includes by argument compatibility. Default uses atLeast matching.

den.lib.parametric { nixos.x = 1; includes = [ ... ]; }

Same as parametric. Functions match if all required params are present.

Functions match only if required params exactly equal provided params.

den.lib.parametric.exactly { includes = [ ({ host }: ...) ]; }

Calls the aspect with a fixed context, ignoring the actual context:

den.lib.parametric.fixedTo { host = myHost; } someAspect

Extends the received context with additional attributes before dispatch:

den.lib.parametric.expands { extra = true; } someAspect

Function argument introspection.

Returns true if fn’s required arguments are satisfied by params (atLeast).

Same as canTake.

Returns true only if fn’s required arguments exactly match params.

Conditional function application.

Calls fn ctx if canTake.atLeast ctx fn, otherwise returns {}.

Calls fn ctx if canTake.exactly ctx fn, otherwise returns {}.

_unused: used: used — ignores first argument, returns second. Used for discarding aspect-chain in import-tree.

Shortcuts built with den.lib.take.exactly and den.lib.parametric.fixedTo.

Run aspect only in { host } contexts.

Run aspect only in { host, user } contexts.

Run aspect only in { home } contexts.

Resolves a stage by name with a given context attrset. Returns an aspect-like record. Used internally by the pipeline and by den.lib.diag convenience wrappers.

Contribute Community Sponsor