{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.deskCfg;
in
{
  config = lib.mkIf (cfg.de == "niri") {
    services.greetd = {
      enable = lib.mkDefault true;
      settings = {
        initial_session = {
          command = lib.mkDefault "${pkgs.niri}/bin/niri-session";
          user = lib.mkDefault cfg.userName;
        };
      };
    };
  };
}
