Issue
I’ve tried to play 32 bit games on a nixos 20.09 system with no luck, the problem seems to reside on hardware.opengl.driSupport32Bit = true not downloading 32 bit version of the nvidia driver as the intel one actually run the game.
Expected behaviour
hardware.opengl.driSupport32Bit = true downloads 32 bit nvidia drivers on offload mode
Configuration
NixOS 20.09
configuration.nix
{ config, pkgs, ... }:
let
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
exec -a "$0" "$@"
'';
in
{
....
nixpkgs.config.allowUnfree = true;
hardware.opengl.driSupport32Bit = true;
hardware.nvidia.prime.offload.enable = true;
hardware.nvidia.prime = {
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
intelBusId = "PCI:0:2:0";
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
nvidiaBusId = "PCI:1:0:0";
};
Notes
This isn’t an issue of the nvidia not being able to run the game as on other distros it actually can, so I assume the issue resides on not having 32 bit support.
I would open an issue on github but my knowledge of how nixos operates on the inside is very limited.
Thanks in advance for the help.