Skip to content

fix: disambiguate multi-system homes targeting same homeConfigurations output#565

Merged
sini merged 1 commit into
mainfrom
fix/home-intoattr-dedup
May 25, 2026
Merged

fix: disambiguate multi-system homes targeting same homeConfigurations output#565
sini merged 1 commit into
mainfrom
fix/home-intoattr-dedup

Conversation

@sini
Copy link
Copy Markdown
Collaborator

@sini sini commented May 23, 2026

Summary

  • When the same user name is declared under den.homes on multiple systems (e.g. x86_64-linux + aarch64-darwin), both default intoAttr to homeConfigurations.<name>. Previously lib.recursiveUpdate silently merged the two independent module-system evaluations, mixing platform paths (/home/ben/ + /Users/ben/) 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.

Test plan

  • 829/829 CI tests pass (4 new)
  • pipe-scope.test-pipe-collect-fleet passes (same-entity via fleet + direct policy not broken)
  • Verified against benbelov-nixconfig — produces ben@x86_64-linux and ben@aarch64-darwin with correct system pkgs each

@sini sini requested a review from vic as a code owner May 23, 2026 02:06
…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 sini force-pushed the fix/home-intoattr-dedup branch from 9c2354f to c092613 Compare May 23, 2026 02:30
@sini sini changed the title fix: dedup multi-system homes targeting same homeConfigurations output fix: disambiguate multi-system homes targeting same homeConfigurations output May 23, 2026
@sini sini enabled auto-merge (squash) May 25, 2026 06:45
@sini sini merged commit 0b250e1 into main May 25, 2026
16 checks passed
@sini sini deleted the fix/home-intoattr-dedup branch May 25, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allow-ci allow all CI integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants