{
  lib,
  pkgs,
  ...
}: {
  nixpkgs.config.allowUnfreePredicate = pkg:
    builtins.elem (lib.getName pkg) [
      "steam"
      "steam-unwrapped"
      "steam-run"
      "steam-original"
      "osu-lazer"
    ];
  programs.steam = {
    enable = true;
    remotePlay.openFirewall = true;
    dedicatedServer.openFirewall = true;
    gamescopeSession = {
      enable = true;
      args = ["-r" "120" "-W" "3840" "-H" "2160" "-O" "HDMI-A-1" "--rt" "--hdr-enabled" "--adaptive-sync"];
      env = {
        ENABLE_HDR_WSI = "1";
        DXVK_HDR = "1";
      };
    };
  };
  programs.gamescope = {
    enable = true;
    capSysNice = true;
  };
  programs.gamemode.enable = true;
}
