{ pkgs, ... }: { # TurboVNC and VirtualGL packages with 32-bit support environment.systemPackages = with pkgs; [ turbovnc virtualgl pkgsi686Linux.virtualgl # Essential for 32-bit OpenGL applications # Additional utilities for VNC sessions xorg.xhost xorg.xauth xorg.xrandr # Desktop environment components for VNC plasma-desktop konsole dolphin # Alternative lightweight desktop xfce.xfce4-session xfce.xfdesktop xfce.xfce4-panel xfce.thunar ]; # Configure library paths for VirtualGL environment.sessionVariables = { LD_LIBRARY_PATH = [ "/run/opengl-driver/lib/:/run/opengl-driver-32/lib:${pkgs.virtualgl}/lib:${pkgs.pkgsi686Linux.virtualgl}/lib" ]; }; # Open VNC ports in firewall networking.firewall.allowedTCPPorts = [ 5901 5902 5903 ]; # Ensure proper OpenGL support hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; # Critical for VirtualGL 32-bit support }; }