{ config, lib, pkgs, ... }: let inherit (lib.modules) mkIf; inherit (lib.options) mkEnableOption; cfg = config.modules.system.programs.steam; in { options.modules.system.programs.steam.enable = mkEnableOption "Steam games platform"; config = mkIf cfg.enable { programs.steam = { enable = true; package = pkgs.steam.override { extraEnv = { MANGOHUD = true; SDL_VIDEODRIVER = "x11"; }; extraLibraries = p: builtins.attrValues { inherit (p) atk; }; }; gamescopeSession.enable = true; extraCompatPackages = [ pkgs.proton-ge-bin.steamcompattool ]; }; services.udev.extraRules = '' SUBSYSTEM=="input", ATTRS{idVendor}=="2dc8", ATTRS{idProduct}=="3106", MODE="0660", GROUP="input" ''; # See # https://wiki.nixos.org/wiki/GameMode programs.gamemode.enable = true; }; }