{
  config,
  lib,
  pkgs,
  hyprland,
  hyprpanel,
  ...
}:
{
  options.desktop.enable = lib.mkEnableOption "Enable Wayland compositor with hyprland login";

  config = lib.mkIf config.desktop.enable {
    hardware.graphics.enable = true;

    security.polkit.enable = true;
    security.pam.services.hyprlock = { };

    services.dbus.enable = true;

    programs.hyprland.enable = true;
    programs.hyprland.package = hyprland.packages.${pkgs.system}.hyprland;

    nixpkgs.overlays = [ hyprpanel.overlay ];

    services.greetd = {
      enable = true;
      settings = {
        default_session = {
          user = "lilith";
          command = "Hyprland";
        };
        initial_session = {
          user = "lilith";
          command = "Hyprland";
        };
      };
    };
  };
}
