# profiles/base/default.nix — Always loaded on every host.
#
# Provides:
#   - nix-colors and m3ta-nixpkgs HM module imports
#   - Shell (nushell, fish, starship) with enable options
#   - CLI tools (bat, carapace, direnv, eza, fzf, lf, nitch, television, zellij, zoxide)
#   - Secrets management (pass-wayland)
#   - Color scheme (dracula)
#   - Base packages
#
# NOTE: Overlays are NOT set here. The consuming flake (nixos-config) handles
# overlays at the NixOS level via nixpkgs.overlays. This module only imports
# HM modules and sets user-level preferences.
#
# When used standalone (not through NixOS), overlays should be set by the
# standalone HM configuration or by the consuming flake.
{
  inputs,
  lib,
  pkgs,
  ...
}: {
  imports = [
    inputs.nix-colors.homeManagerModules.default
    inputs.m3ta-nixpkgs.homeManagerModules.default

    ./shell
    ./cli-tools
    ./secrets
  ];

  # ── nixpkgs configuration ──
  # NOTE: When used via NixOS with useGlobalPkgs=true, nixpkgs.config is
  # managed at the NixOS level. Only set it here for standalone HM usage.
  # nixpkgs.config.allowUnfree = true;

  # ── Nix settings ──
  nix = {
    package = lib.mkDefault pkgs.nix;
    settings = {
      experimental-features = ["nix-command" "flakes"];
      warn-dirty = false;
    };
  };

  # ── Color scheme ──
  colorScheme = inputs.nix-colors.colorSchemes.dracula;

  # ── Base packages ──
  home.packages = with pkgs; [
    libgtop
  ];

  # ── Home Manager self-management ──
  programs.home-manager.enable = true;

  # ── Default home state version ──
  home.stateVersion = lib.mkDefault "26.05";
}
