{
  hostname,
  users ? [ ],
}:
let
  mkHome = import ./mkHome.nix;
  usersHomes = builtins.listToAttrs (
    map (username: {
      name = username;
      value = mkHome {
        inherit username hostname;
      };
    }) users
  );
  usersSystemsConfigs = map (username: ../users/${username}/system.nix) users;
in
{
  home-manager.users = usersHomes;
  imports = usersSystemsConfigs;
}
