···108108109109 runScript = writeScript "steam-wrapper.sh" ''
110110 #!${stdenv.shell}
111111- glxinfo >/dev/null 2>&1
112112- if [ ! "$?" = "0" ]; then
113113- echo "*** WARNING: Test for 32-bit libGL unsuccessful."
114114- echo " This could mean you forgot to activate hardware.opengl.driSupport32Bit"
111111+ if [ -f /host/etc/NIXOS ]; then # Check only useful on NixOS
112112+ glxinfo >/dev/null 2>&1
113113+ # If there was an error running glxinfo, we know something is wrong with the configuration
114114+ if [ $? -ne 0 ]; then
115115+ cat <<EOF > /dev/stderr
116116+ **
117117+ WARNING: Steam is not set up. Add the following options to /etc/nixos/configuration.nix
118118+ and then run \`sudo nixos-rebuild switch\`:
119119+ {
120120+ hardware.opengl.driSupport32Bit = true;
121121+ hardware.pulseaudio.support32Bit = true;
122122+ }
123123+ **
124124+ EOF
125125+ fi
115126 fi
116127 steam
117128 '';