{
  lib,
  options,
  machine,
  ...
}:
with lib;
{
  options = {
    custom.program = mkOption {
      type = types.attrsOf (
        types.submodule (
          { config, ... }:
          {
            options = {
              name = mkOption {
                type = types.string;
              };
              home-config = mkOption {
                type = types.deferredModule;
              };
              system-config = mkOption {
                type = types.deferredModule;
                default = _: { };
              };
            };
            config = if builtins.isNull machine.home-only then config.system-config else config.home-config;
          }
        )
      );
    };
  };
}
