{ pkgs
, lib
, config
, ... }: with lib; let
  cfg = config.home.steam;
in mkIf cfg.enable {
  hardware.steam-hardware.enable = true;

  networking.firewall = {
    allowedTCPPorts = [ 27015 27036 ];
    allowedUDPPorts = [ 27015 ];
    allowedUDPPortRanges = [ { from = 27031; to = 27036; } ];
  };
}
