{
  config,
  lib,
  pkgs,
  ...
}: let
  cfg = config.hive.nextcloud;
in {
  options.hive.nextcloud = {
    enable = lib.mkEnableOption "Enable Nextcloud client";
  };
  config = lib.mkIf cfg.enable {
    services.nextcloud-client = {
      enable = true;
      startInBackground = true;
      package = pkgs.nextcloud-client;
    };
  };
}
