Skip to content

Document addScoped #32

Description

@theutz

#31 just landed, allowing users to inject variables into the scope of every module in the tree.

Example:

# flake.nix
import-tree.addScope { colors = ["red" "green" "blue"]; } ./modules
# modules/example.nix
{
  brand.colors = colors;
}

In example.nix, colors does not need to be explicitly imported at the top of the file. It's already in scope.

See #30 for how it will enhance onboarding for den.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions