# modules/default.nix — Export all m3ta-home modules as a HM module set.
#
# This allows nixos-config to import all modules at once:
#   imports = [ inputs.m3ta-home.homeManagerModules.default ];
#
# Individual modules declare their own options (mkEnableOption etc.)
# and are activated by mkHome's import mechanism.
{
  inputs,
  selfPath,
}: {
  default = {
    imports = [
      # External modules
      inputs.agent-lib.homeManagerModules.default
      inputs.dms.homeModules.default
      inputs.dms-plugin-registry.homeModules.default
      inputs.nix-colors.homeManagerModules.default
      inputs.m3ta-nixpkgs.homeManagerModules.default
      # Paths — must be first, provides "m3ta-home".paths.srcRoot
      ./paths.nix

      # Profiles
      ./../profiles/base
      ./../profiles/contexts/desktop
      ./../profiles/contexts/server
      ./../profiles/sets/coding
      ./../profiles/sets/gaming
      ./../profiles/sets/media

      # Users
      ./../users/m3tam3re/preferences
      ./../users/m3tam3re/identities/private.nix
      ./../users/m3tam3re/identities/work.nix
    ];

    _module.args.m3taHomeInputs = inputs;

    # Set the source root for asset path resolution
    "m3ta-home".paths.srcRoot = selfPath;
  };
}
