{ lib, ... }:
{
  config = {
    assertions = [ (lib.rp.assertMinimumVersion "24.05") ];
  };

  options.rose-pine = {
    enable = lib.mkEnableOption "Rosé Pine globally";

    flavor = lib.mkOption {
      type = lib.rp.types.flavorOption;
      default = "main";
      description = "Global Rosé Pine flavor";
    };

    accent = lib.mkOption {
      type = lib.rp.types.accentOption;
      default = "love";
      description = "Global Rosé Pine accent";
    };

    sources =
      let
        defaultSources = import ../../.sources;
      in
      lib.mkOption {
        type = lib.types.lazyAttrsOf lib.types.raw;
        default = defaultSources;
        defaultText = "{ ... }";
        # HACK!
        # without this, overriding one source will delete all others. -@getchoo
        apply = lib.recursiveUpdate defaultSources;
        description = "Port sources used across all options";
      };
  };
}