···11-{ den, ... }:
11+{ den, lib, ... }:
22let
33 inherit (den.lib) parametric;
4455 description = ''
66- Projects all homeManager-class configs from the host's aspect tree
66+ Projects all `user.classes` like `homeManager` from the host's aspect tree
77 onto users who opt in. Requires the fx pipeline.
8899 ## Usage
···1111 den.aspects.tux.includes = [ den._.host-aspects ];
12121313 Any host aspect that defines a `homeManager` key will have that
1414- config forwarded to the user's homeManager evaluation. Other class
1414+ config forwarded to the user's homeManager evaluation. Other host-class
1515 keys (nixos, darwin) are ignored — host.aspect is resolved
1616- specifically for class "homeManager".
1616+ specifically for `user.classes`.
1717 '';
18181919 from-host =
2020 { host, user }:
2121- {
2222- homeManager = den.lib.aspects.resolve "homeManager" (
2323- parametric.fixedTo { inherit host user; } host.aspect
2424- );
2525- };
2121+ lib.listToAttrs (
2222+ map (class: {
2323+ name = class;
2424+ value = den.lib.aspects.resolve class (parametric.fixedTo { inherit host user; } host.aspect);
2525+ }) user.classes
2626+ );
26272728in
2829{