Repository navigation
fix: hm-host crash with standalone homes + homeManager forwarding - #559
Merged
Merged
Conversation
…ding
policy.when wrappers lost the predicate's argument signature, causing
dispatch in contexts missing required args (e.g. standalone home
resolution hitting a { host, ... } predicate). Pre-check required
args against ctx before calling the predicate.
Fold hmHostBridge into makeHomeEnv via schemaIncludes param — the
battery already gates on mkDetectHost and iterates users. Schema
includes now enter both host scope (nixos/darwin keys) and user
sub-scopes (homeManager keys route via userForward). Eliminates
the separate bridge, hasHmUsers, and conditional host includes.
sini
force-pushed
the
fix/hm-host-schema-bugs
branch
from
May 19, 2026 20:45
fc3ed6e to
6316024
Compare
drupol
reviewed
May 20, 2026
drupol
left a comment
Collaborator
There was a problem hiding this comment.
Tests are passing, let's merge it.
theutz
approved these changes
May 20, 2026
sini
enabled auto-merge (squash)
May 20, 2026 13:42
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
{ host, ... }predicates dispatch in non-host contexts (e.g., standalone home resolution via late dispatch).schemaIncludesparameter so the battery'spolicyFnincludes schema content at both host scope (nixos/darwin keys) and user sub-scopes (homeManager keys route viauserForward). Eliminates the separate bridge,hasHmUsers, and conditional host includes entry.Fixes three user-reported issues:
schema.hm-hostcrashes when a standaloneden.homesexists alongside hosts with HM usersschema.hm-hostincludes withhomeManagerclass keys are silently dropped (nixos keys worked, homeManager didn't)policy.whenwith strict predicates crashes in cross-scope dispatch contextsTest plan
deadbugs/(policy-when arg safety, standalone crash, homeManager forwarding)nix develop -c just ciclean