{
  pkgs,
  lib,
  config,
  ...
}: let
  cfg = config.gaming.steam;
in {
  options.gaming.steam = {
    enable = lib.mkEnableOption "enable steam";
  };

  config = lib.mkIf cfg.enable {
    programs.steam = {
      enable = true;
      gamescopeSession.enable = true; # requires setting launch option `gamescope <options> -- %command%`
      remotePlay.openFirewall = true; # open ports for remote play
      #dedicatedServer.openFirewall = true; # open ports for source dedicated server
      protontricks.enable = true;
    };
  };
}
