{ config, lib, pkgs, ... }:

let
  cfg = config.samfelag.modules.app.nextcloud;
in
{
  options.samfelag.modules.app.nextcloud = {
    enable = lib.mkEnableOption "nextcloud";
  };
  config = lib.mkIf cfg.enable {
    environment.systemPackages = with pkgs; [
      nextcloud-client
    ];

    hm.services.nextcloud-client = {
      enable = true;
      startInBackground = true;
    };

  };
}
