{
  config,
  lib,
  namespace,
  ...
}:
let
  cfg = config.${namespace}.desktop.cosmic;
in
{
  imports = [ ./options.nix ];
  config = lib.mkIf cfg.enable {
    services = {
      desktopManager.cosmic.enable = true;
      displayManager.cosmic-greeter.enable = true;
    };
  };
}
