{ lib, config, pkgs, ... }:
with lib;
let
  cfg = config.modules.gaming.lutris;
in
{
  options.modules.gaming.lutris = {
    enable = mkEnableOption "enable Lutris Gaming preservation platform";
  };
  config = mkIf cfg.enable {
    home.packages = with pkgs; [
      ( lutris.override {
        extraLibraries = pkgs: [
          wine
          xorg.libXcursor
          xorg.libXi
          xorg.libXinerama
          xorg.libXScrnSaver
          libpng
          libpulseaudio
          libvorbis
          stdenv.cc.cc.lib
          libkrb5
          keyutils
        ];
      })
    ];
  };
}
