{
  config,
  lib,
  pkgs,
  namespace,
  ...
}:
let
  cfg = config.${namespace}.desktop.gnome;
in
{
  imports = [ ../../../home/desktop/gnome/options.nix ];

  config = lib.mkIf cfg.enable {
    services = {
      # Enable Desktop Environment.
      desktopManager.gnome.enable = true;
      # Enable Desktop Environment.
      displayManager = {
        gdm.enable = lib.mkDefault true;
        gdm.wayland = lib.mkDefault true;
      };

      gnome.gnome-remote-desktop.enable = true;
    };

    xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];

    programs = {
      kdeconnect = {
        enable = false;
        package = pkgs.gnomeExtensions.gsconnect;
      };
    };
  };
}
