{ lib, ... }: let applyHomeManagerConfig = { home-manager, ... }: let applyConfig = user: { home-manager.users.${user.name} = user.config; }; in { home-manager.users = lib.foldl' (acc: user: acc // applyConfig user) {} (lib.attrValues home-manager.users); }; in { applyHomeManagerConfig = applyHomeManagerConfig; }