Repository navigation
fix: disambiguate multi-system homes targeting same homeConfigurations output - #565
Merged
Merged
Conversation
…s output When the same user name is declared under den.homes on multiple systems (e.g. x86_64-linux + aarch64-darwin), both produce homeConfigurations.<name>. Previously lib.recursiveUpdate silently merged the two independent module-system evaluations, mixing platform paths and causing stack overflow. Auto-qualify colliding output names with @System so both are accessible: homeConfigurations."ben@x86_64-linux" and homeConfigurations."ben@aarch64-darwin". Single-system homes keep the plain name. Same-entity duplicates from multiple policy paths (e.g. fleet + direct) are deduped to last entry.
sini
force-pushed
the
fix/home-intoattr-dedup
branch
from
May 23, 2026 02:30
9c2354f to
c092613
Compare
sini
enabled auto-merge (squash)
May 25, 2026 06:45
drupol
approved these changes
May 25, 2026
This was referenced May 29, 2026
sini
added a commit
that referenced
this pull request
May 29, 2026
## Summary - `entry.system or "unknown"` in the disambiguation warning throws `cannot coerce null to a string` when `entry.system` is `null` - Nix's `or` only applies to attribute access (`a.b or default`), not standalone values - Use explicit `if` check instead Introduced in #565 (`0b250e17`). ## Test plan - [ ] `nix flake check` passes - [ ] Flake with duplicate instantiate specs on null-system entities no longer crashes
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.
Summary
den.homeson multiple systems (e.g.x86_64-linux+aarch64-darwin), both defaultintoAttrtohomeConfigurations.<name>. Previouslylib.recursiveUpdatesilently merged the two independent module-system evaluations, mixing platform paths (/home/ben/+/Users/ben/) and causing stack overflow.@systemso both are accessible:homeConfigurations."ben@x86_64-linux"andhomeConfigurations."ben@aarch64-darwin".Test plan
pipe-scope.test-pipe-collect-fleetpasses (same-entity via fleet + direct policy not broken)benbelov-nixconfig— producesben@x86_64-linuxandben@aarch64-darwinwith correct system pkgs each