homeManager class forwarding silently no-ops for darwin hosts
Summary
The homeManager class on user aspects is not forwarded into home-manager.users.<name> for darwin hosts. The hm-host detection stage does not import inputs.home-manager.darwinModules.home-manager, and the hm-user stage does not forward the user's homeManager config into the darwin system configuration.
This works correctly for NixOS hosts but silently does nothing for darwin, with no error or warning.
Reproduction
# hosts.nix
{ den.hosts.aarch64-darwin.M-02877.users.dktaohan = { }; }
# M-02877/darwin.nix
{ den, inputs, ... }: {
den.aspects.M-02877.darwin = { ... }: { ... };
}
# M-02877/dktaohan.nix
{ den, ... }: {
den.aspects.dktaohan = {
homeManager = { pkgs, ... }: {
home.username = "dktaohan";
programs.atuin.enable = true;
# ...
};
};
}
Expected: darwin-rebuild switch activates home-manager for the user. The darwin system config includes inputs.home-manager.darwinModules.home-manager and home-manager.users.dktaohan is populated from the aspect.
Actual: The darwin system config has no home-manager option at all. nix eval ...#darwinConfigurations.M-02877.config.home-manager.users returns {} (or errors because the option doesn't exist). Home-manager packages are never activated and never land in PATH.
Impact
- Silent failure — no evaluation error, no warning
- Home-manager generation becomes permanently stale
- All
programs.*modules with shell integration (atuin, zoxide, direnv, starship, etc.) generate init scripts referencing bare command names that aren't in PATH home.packagesnever reaches the user's environment
Workaround
Manually wire in darwin.nix:
{ den, inputs, ... }: {
den.aspects.M-02877.darwin = { ... }: {
imports = [ inputs.home-manager.darwinModules.home-manager ];
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "hm-bak";
home-manager.users.dktaohan = {
imports = [
den.aspects.dktaohan.homeManager
den.default.homeManager
];
};
};
}
Note: den.default.homeManager must also be explicitly imported for overlays/config to apply.
Environment
- den:
0af82e24be89b9fd400bd0b58b0fed5ea0f269ad(2026-04-20) - home-manager:
e4419d3123b780d5f4c0bceeace450424387638c(2026-05-07) - nix-darwin: latest from
nixpkgs-unstable - Platform: aarch64-darwin
Thanks for the detailed write-up! The development team for den are in the midst of a large overhaul of the den architecture, which should be released very soon. (Probably today! 🎉)
Would you mind testing your issue against feat/fx-pipeline to see if it persists there? If you have questions about breaking changes, the new docs are currently hosted at https://den.json64.dev.
This is resolved on main as of the fx-pipeline merge (62544147).
The new makeHomeEnv in home-env.nix handles darwin natively — getModule resolves inputs.home-manager."${host.class}Modules".home-manager, which correctly produces darwinModules.home-manager for darwin hosts. The forward routing from homeManager class to host.class (darwin) also works generically.
Verified with a test reproducing the reported config:
den.hosts.aarch64-darwin.macbook.users.tux = { };
den.aspects.tux.homeManager = { ... }: { ... };
Both config.home-manager existing and config.home-manager.users.tux being populated pass.