{
  config,
  lib,
  pkgs,
  ...
}: let
  cfg = config.hive.plasma;
in {
  options.hive.plasma = {
    enable = lib.mkEnableOption "Enable Plasma desktop environment with sddm";
  };

  config = lib.mkIf cfg.enable {
    services.desktopManager.plasma6.enable = true;

    xdg.portal = {
      enable = true;
      extraPortals = with pkgs; [
        kdePackages.xdg-desktop-portal-kde
        xdg-desktop-portal-gtk
      ];
    };
  };
}
