A homeManager class module that requests the user entity arg is silently dropped when the aspect is applied to a standalone home whose user cannot be resolved from a declared host. No error, no warning — the whole class block just disappears.
den.homes.x86_64-linux.tux = { };
den.default.homeManager.home.stateVersion = "25.11";
den.default.includes = [ den.batteries.define-user ];
den.aspects.probe.homeManager =
{ user, ... }:
{
home.file."OUT".text = "user=${user.name}";
};
den.aspects.tux.includes = [ den.aspects.probe ];
# config.flake.homeConfigurations.tux.config.home.file ? "OUT" => false
Matrix
| home |
{ user, ... } reaches the consumer? |
den.homes.<sys>.tux (bare) |
no |
den.homes.<sys>."tux@astra", astra not in den.hosts |
no |
den.homes.<sys>."tux@igloo", igloo declared with users.tux |
yes |
hosted HM (den.hosts.<sys>.igloo.users.tux) |
yes |
{ home, ... } on a bare/synthetic standalone home (control) |
yes |
Cause
nix/lib/entities/home.nix sets config._module.args.user = userByName, and userByName is non-null only when the home is named user@host and that host is declared in den.hosts with that user. For a bare standalone home, or a user@host home on a synthetic (undeclared) host, there is no user in ctx.
wrapFunctionModule (nix/lib/aspects/fx/class-module.nix:120) then puts the module on the missingDenArgNames path and returns unsatisfied = true. The module is dropped downstream, and because the lib.warn-wrapped module is never forced, the "den: class module requests 'user' but no user context is available" warning is never printed.
The schema DAG doesn't offer a fallback either: user.parent = "host" and home.parent = "host" make user a sibling of home, not a descendant, so the descendant fan-out added in #634 doesn't apply.
Notes
A
homeManagerclass module that requests theuserentity arg is silently dropped when the aspect is applied to a standalone home whose user cannot be resolved from a declared host. No error, no warning — the whole class block just disappears.Matrix
{ user, ... }reaches the consumer?den.homes.<sys>.tux(bare)den.homes.<sys>."tux@astra",astranot inden.hostsden.homes.<sys>."tux@igloo",igloodeclared withusers.tuxden.hosts.<sys>.igloo.users.tux){ home, ... }on a bare/synthetic standalone home (control)Cause
nix/lib/entities/home.nixsetsconfig._module.args.user = userByName, anduserByNameis non-null only when the home is nameduser@hostand that host is declared inden.hostswith that user. For a bare standalone home, or auser@hosthome on a synthetic (undeclared) host, there is nouserin ctx.wrapFunctionModule(nix/lib/aspects/fx/class-module.nix:120) then puts the module on themissingDenArgNamespath and returnsunsatisfied = true. The module is dropped downstream, and because thelib.warn-wrapped module is never forced, the "den: class module requests 'user' but no user context is available" warning is never printed.The schema DAG doesn't offer a fallback either:
user.parent = "host"andhome.parent = "host"makeusera sibling ofhome, not a descendant, so the descendant fan-out added in #634 doesn't apply.Notes
84b5149and99cc0c5a, so this is pre-existing and not a regression from fix: surface spawn-projected quirk emits at the requesting scope #625 / fix: surface the requesting scope's own quirk emits into host-aspects spawns #633 / fix: fan class-module entity args over scope descendants (#629) #634.userName, so bindinguserfrom the home entity looks feasible. Failing that, the drop should at least surface the warning that already exists.home-managergenerations stop updating after first or second switch #639.