{ config, pkgs, lib, ... }:

let
  cfg = config.samfelag.modules.gaming.steam;
in
{
  options.samfelag.modules.gaming.steam = {
    enable = lib.mkEnableOption "steam";
  };
  config = lib.mkIf cfg.enable {

    # nixpkgs.config.packageOverrides = pkgs: {
    #   steam = pkgs.steam.override {
    #     extraPkgs = pkgs: with pkgs; [
    #       pango
    #       libthai
    #       harfbuzz
    #     ];
    #   };
    # };

    programs.steam = {
      enable = true;
      # package = with pkgs; (pkgs.steam.override {
      #   extraPkgs = pkgs: with pkgs; [ pango harfbuzz libthai ];
      # });
      remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
      dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
    };
  };
}
