{ lib, config, pkgs, ... }: let inherit (lib) mkIf; inherit (builtins) elem; isx86Linux = pkgs: with pkgs.stdenv; hostPlatform.isLinux && hostPlatform.isx86; features = config.ooknet.host.hardware.features; in { config = mkIf (elem "video" features) { hardware = { opengl = { enable = true; driSupport32Bit = isx86Linux pkgs; }; }; xdg.portal = { enable = true; xdgOpenUsePortal = true; extraPortals = with pkgs; [ xdg-desktop-portal-hyprland xdg-desktop-portal-gtk ]; config = { common.default = ["gtk"]; hyprland.default = ["gtk" "hyprland"]; }; }; }; }