fix: disambiguate multi-system homes targeting same homeConfigurations output#565
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.
9c2354f to
c092613
Compare
drupol
approved these changes
May 25, 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.
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