NVIDIA
- First follow NixOS Nvidia Installation
- edit
configuration.nix
and add the following: 
sudo nixos-rebuild switch --flake /etc/nixos#default
AMD
- Follow NixOS OpenGL Installation
- Edit
configuration.nix
{ config, pkgs, ... }:
{
security.polkit.enable = true;
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
};
fonts.enableDefaultFonts = true;
programs.dconf.enable = true;
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
}
- Edit
~/.config/hypr/hyprland.conf
env = WLR_DRM_DEVICES,/dev/dri/card1
- Then follow https://www.youtube.com/watch?v=61wGzIv12Ds&t=360s