Nixos configuration ignores opengl.enable = true

Hi, I am trying to reuse an old HP compaq 6715b and i have some issues with graphics.
WHen i try to start dwl or hyprland, i get some egl error, and that renderer could not be initilized.
First of all i think, that OpenGL isn t enabled even when i set hradware.opengl.enable to true.

When i tried to run eglinfo or glxinfo, it returned command not found.

I have also installed mesa.

This is configuration.nix:


  # Graphics
  nixpkgs.config.allowUnfree = true;
  #services.xserver.enable = true;
  #services.xserver.videoDrivers = [ "radeon" ];
  hardware.opengl.enable = true;
  hardware.opengl.driSupport = true;
  hardware.opengl.driSupport32Bit = true;
  programs.xwayland.enable = true;


  boot.kernelPackages = pkgs.linuxPackages_latest;

  boot.kernelParams = [ "modeset" ];

And hardware-configuration.nix:

boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "firewire_ohci" "usb_storage" "sd_mod" "sr_mod" ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-amd" "wl" "radeon"];
  boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];

Does ist help to run glxinfo via nix-shell? I don’t think these tools are available when settings hardware.opengl.enable. In my case it is nix run nixpkgs#glxinfo.

I tried it and it returned Error: unable to open display