Repository navigation
fix: correct flake output include to flake-system schema kind - #587
Merged
Merged
Conversation
The packages/checks/devShells reference example told users to write den.schema.flake-packages.includes, but flake-packages is not a registered schema kind. den.schema is freeform, so the entry is silently accepted and its includes are never walked — a no-op with no error or warning. The aspect only reached flake outputs if some host happened to include it. The correct kind is flake-system: aspects included there resolve at each per-system scope, and the packages/apps/checks/devShells routes (also registered on flake-system) carry the class output to the flake. Fixes denful#586.
drupol
approved these changes
Jun 1, 2026
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.
Problem
The reference page for flake outputs (
docs/src/content/docs/reference/output.mdx) instructs:But
flake-packagesis not a registered schema kind. The registered routing kinds areflake,flake-system,flake-parts, anddefault. Becauseden.schemais a freeformlazyAttrsOf schemaEntryType, the bad kind is silently accepted and nothing ever resolves to it, so its includes are never walked. It does nothing.This is what #586 hit. The aspect's package only appeared in
nix flake showwhen a host happened to include the aspect, pulling it into a real instantiation path. Removing that host made the package vanish, because the documentedflake-packagesline was doing nothing.Fix
Point the example at
flake-system, the kind that is actually instantiated (one scope per system, via theto-systemsfan-out). Aspects included there resolve at each per-system scope, and theto-packages/to-apps/to-checks/to-devShellsroutes, also registered onflake-system, carry the class output to the flake.Verification
Against a minimal repro (aspect with a
packagesclass key, no host):den.schema.flake-packages.includesgives nopackagesoutput at allden.schema.flake-system.includesexportshellofor every system, no host requiredMatches the workaround the reporter found.
Fixes #586.