Documented Layers, created example layer and template for it.#8
Merged
Conversation
- Layers are now automatically discovered from directories in ./dev/layers. - Added an example vix layer which imports features from vic/vix repo. - Added an example vix template that includes said layer to test it all.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for automatically discovering layer modules from ./dev/layers, provides an example “vix” layer and its corresponding flake template, and updates documentation to guide users through setup.
- Introduces
discoverLayerslogic indev/layers/options.nixand wiring indev/modules/discovered.nixto auto-generate a Nix module for each layer directory. - Adds a “vix” example layer under
dev/layers/vixalong with a template intemplates/vix. - Updates the Getting-Started and Dendrix-Layers guides in
dev/bookto reflect the new layer structure.
Reviewed Changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| templates/vix/modules/layers.nix | New import module for the vix example layer |
| templates/vix/modules/default.nix | Default flake-parts modules for vix template |
| templates/vix/flake.nix | Flake definition wiring dendrix, import-tree, etc. |
| templates/default/modules/layers.nix | Disabled the vix import in the default template |
| dev/modules/discovered.nix | Pipeline to generate a layers.nix module for each layer |
| dev/layers/vix/modules/default.nix | Example layer module for “vix” |
| dev/layers/vix/README.md | Placeholder README for the vix layer |
| dev/layers/options.nix | discoverLayers option and type definition |
| dev/default.nix | Switched from ad-hoc match to layers/options.nix |
| dev/book/src/Getting-Started.md | Usage instructions updated for dendrix input & layers |
| dev/book/src/Dendrix-Layers.md | Layer creation guide updated to new directory layout |
Comments suppressed due to low confidence (2)
dev/layers/vix/README.md:1
- The README is just a header; please expand it with usage details, input requirements, and examples to match the guidance in
Dendrix-Layers.md.
# vix layer.
dev/layers/options.nix:11
- The
discoverLayersfunction is a key new feature for auto-discovery; consider adding unit or integration tests to validate its behavior with different directory structures.
discoverLayers = lib.pipe ./. [
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Layers are now automatically discovered from directories in ./dev/layers.
Added an example vix layer which imports features from vic/vix repo.
Added an example vix template that includes said layer to test it all.