{ lib, config, pkgs, ... }: {
  # # For steam
  # services.flatpak.enable = true;
  # ## Flatpak requires this
  xdg.portal.enable = true;
  xdg.portal.wlr.enable = true;
  xdg.portal.config.common.default = "*";
  # On X11: Steam requires a compositor for BigPicture
  programs.steam.enable = true;
  # Game compat
  programs.gamemode.enable = true;

  nixpkgs.overlays = [(final: prev: {
    shattered-pixel-dungeon = prev.shattered-pixel-dungeon.overrideAttrs (old: rec {
      version = "3.2.5";

      patches = [];
      
      mitmCache = final.gradle_8.fetchDeps {
        inherit (old) pname;
        data = ./shattered-pixel-dungeon/deps.json;
      };
      
      src = pkgs.fetchFromGitHub {
        owner = "00-Evan";
        repo = "shattered-pixel-dungeon";
        rev = "v${version}";
        hash = "sha256-ltCKM46nzZZVJqHzo3V0Igyd4q+uD95fuLMWCi18jbQ=";
      };
    });
  })];
  
  environment.systemPackages = with pkgs; [
    # For Steam
    protontricks
    gamescope
    gamescope-wsi
    
    # Minecraft
    openjdk17
    prismlauncher
    
    # PS2 Games
    pcsx2

    # Standalone
    shattered-pixel-dungeon
  ];
}
