Hyprland windows not visible

When I run hyprland the background and waybar show up, but I can’t see the open windows or the cursors. The windows definitely exist, since they’re listed when I do hyprctl clients. I can also confirm that they’re on the correct monitor and workspace. An invisible kitty window can still run the commands I type in, so it’s only an issue with the graphics. My computer has an nvidia 3090 and is running Nixos 24.11.

The relevant parts of my setup are below:

configuration.nix

services.xserver = {
    enable = true;
    videoDrivers = [ "nvidia" ];
  };

hardware.graphics.enable = true;
  hardware.nvidia.open = false;

programs.hyprland = {
    enable = true;
    withUWSM = true;
  };
  environment.systemPackages = [ pkgs.kitty ];

home.nix

{ pkgs, ... }: {
  home.packages = with pkgs; [ rofi-wayland wl-clipboard waybar mako gtk4 ];

  programs.kitty.enable = true;

  wayland.windowManager.hyprland = {
    enable = true;
    settings = {
      "$mod" = "ALT";
      monitor = ",preferred,auto,1";
      bind = [
        "$mod, q, exit"
        "$mod, t, exec, kitty"
        "$mod, r, exec, rofi -show drun"
        "$mod, a, exec, hyprctl clients &> ~/active.txt"
      ];
      exec-once = [
        "waybar"
        "kitty"
      ];
      debug.enable_stdout_logs = true;
      cursor = { no_hardware_cursors = true; };
      env = [
        "WLR_NO_HARDWARE_CURSORS,1"
        "LIBVA_DRIVER_NAME,nvidia"
        "XDG_SESSION_TYPE,wayland"
      ];
      windowrule = [ "opaque, kitty" ];
    };
  };
}

this might be what you want. though I have a feeling you’ve tried it.

in your config, I don’t see anything specifying the size of the cursor, and when looking at the documentation, it doesn’t look like there is a “default” set anywhere. for my instalation I have both
env = XCURSOR_SIZE, 18
and
env = HYPRCURSOR_SIZE, 18
with hyprcursor installed. this might be helpful?

it could be that you need to specify a layout like dwindle. my config looks like this for dwindle:

dwindle {
    pseudotile = true
    preserve_split = true
}

in the “general” section of my config, you also have to specify the layout

general {
    layout = dwindle
}

I should mention that I use a .conf file for my hyprland setup cause that’s the default for hyprland. so, your probably going to have to change the syntax.

I’m not that experienced at this but someone needs to help so I’m trying.