{ ... }: {
  flake.nixosModules.usersCatalogOptions =
    { lib, ... }:
    {
      options.chiasson.users = {
        catalog = lib.mkOption {
          type = lib.types.attrs;
          default = { };
          description = ''
            User records merged from `usersCatalogDefaults`; override with `hostOverrides` or `mkForce`.
          '';
        };
        enabled = lib.mkOption {
          type = lib.types.listOf lib.types.str;
          default = [ ];
          description = "Catalog names to materialize as `users.users` on this machine.";
        };
        hostOverrides = lib.mkOption {
          type = lib.types.attrs;
          default = { };
          description = ''
            `recursiveUpdate`d onto catalog users.
          '';
        };
        extraModules = lib.mkOption {
          type =
            (lib.types.attrsOf (lib.types.listOf lib.types.unspecified))
            // {
              merge =
                loc: defs:
                let
                  values = map (d: d.value) defs;
                  names = lib.unique (lib.concatLists (map builtins.attrNames values));
                in
                lib.genAttrs names (
                  name: lib.concatLists (map (v: v.${name} or [ ]) values)
                );
            };
          default = { };
          description = ''
            Per-user Home Manager `extraModules` keyed by catalog user name.
            Keys must match `chiasson.users.enabled`. Lists from multiple modules
            are concatenated (e.g. `desktop-home-base.nix` + host `home.nix`).
          '';
        };
        homeManager = {
          autoWire = lib.mkOption {
            type = lib.types.bool;
            default = true;
            description = "Create HM users from the catalog when true.";
          };
        };
      };
    };
}
