{
  config,
  lib,
  ...
}: {
  imports = [../../programs/borgmatic];

  options.dotfiles.inputs.home-manager.services.borgmatic.enable =
    lib.dotfiles.mkEnableOption;

  config =
    lib.mkIf
    config.dotfiles.inputs.home-manager.services.borgmatic.enable
    {
      dotfiles.inputs.home-manager.programs.borgmatic.enable = true;
      services.borgmatic.enable = true;
    };
}
