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

with lib;

let
  cfg = config.roles.desktop;
in
{
  config = mkIf (cfg.enable && cfg.sddm) {
    services.displayManager.sddm = {
      enable = true;
      wayland.enable = (!cfg.x11 && cfg.wayland);
    };
  };
}
