#
# Provide steam; for gameyputers.
#
{ pkgs, ... }:
{
	programs.steam = {
		enable = !pkgs.stdenv.isAarch64;

		# Start our steam with appropriate environment vars set.
		package = pkgs.steam.override {
			extraEnv = {
				__GLX_VENDOR_LIBRARY_NAME = "nvidia";
			};
		};

		# Allow Steam to provide services for other LAN units.
		localNetworkGameTransfers.openFirewall = true;
		remotePlay.openFirewall = true;

		# Use extest to better support input on wayland.
		extest.enable = true;

		# Also allow running steam not-from-niri.
		gamescopeSession.enable = true;

		# Make more features available to steam.
		extraPackages = with pkgs; [
			gamescope
		];

	};
}
