{ lib, config, ... }: with lib; let cfg = config.settings.display-manager; in { config = mkIf (cfg == "gdm") { services.xserver.enable = true; services.xserver.displayManager.gdm.enable = true; }; }