I’m trying to set up Lutris to play games with Wine. I don’t understand how I am supposed to install wine runners? Can anyone help?

Edit:* It seems the answer is to install runners through the Lutris UI as usual. The Lutris package runs in an FHS which makes everything work even though the runners are not built for NixOS.

It turns out that what I was missing (I think) was 32-bit DRI support. I enabled that with these lines in my NixOS configuration:

# in /etc/nix/configuration.nix

hardware.opengl = {
  driSupport = true;
  driSupport32Bit = true;
};

Everything below this edit is red herrings.

/end of edit*

I tried installing a runner, lutris-GE-Proton8, through Lutris itself as I do in another distro. That crashed with some sort of error - instead of spending time investigating that I thought I’m probably supposed to install things the Nix way so that dependencies are set up correctly.

I tried installing Wine from nixpkgs like this, and configuring Lutris to use the system Wine:

home.packages = with pkgs; [
  (lutris.override {
    extraPkgs = lutrisPkgs: [
      wine
    ];
  })
];

But when I start up a game I get a warning telling me that I need a version of Wine with esync.

I found a Nix expression for wine-ge in the nix-gaming repo. So I tried building Lutris with that. Here is an excerpt of my Home Manager flake.nix:

{
  inputs = {
    # ...
    nix-gaming = {
      url = "github:fufexan/nix-gaming";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, home-manager, nix-gaming, ... }:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in
    {
      homeConfigurations."jesse" = home-manager.lib.homeManagerConfiguration {
        # ...
        modules = [
          ./home.nix
          # ...
        ];
        extraSpecialArgs.inputs = { inherit nix-gaming; };
      };
    };
}

And the my attempt at a Lutris config in home.nix:

home.packages = with pkgs; [
  (lutris.override {
    extraPkgs = lutrisPkgs: [
      wine
      inputs.nix-gaming.packages.${pkgs.system}.wine-ge
    ];
  })
];

After a great deal of compiling I believe that I have wine-ge installed… somewhere. (I did try to use the nix-gaming binary cache. I probably messed that up by forcing my version of nixpkgs. I’ll probably let nix-gaming use its own nixpkgs version next time.)

I’ve read that the lutris package creates an FHS (Filesystem Hierarchy Standard) environment. That is a filesystem somewhere with the directory layout you see in other distros. I expected that wine-ge would be linked into the FHS somewhere. I had the thought that I would configure Lutris with the path to wine-ge. But the file browser that I get in Lutris seems to show me the host file system, not the FHS.

I thought that maybe I could give Lutris the store path to wine-ge. Then if when I upgrade I’ll have to track that down and set the path again. Is there a better way?

  • Oh whoops - I overlooked something. Some thoughtful person set things up so that the FHS environment is in the file browser side bar when you use the Lutris UI to specify a path to a custom Wine installation.

  • Well I got the wine-ge install from nix-gaming hooked up using its store path. But that brought me back to exactly the same error message that I got when using the Wine runner installed through Lutris’ own runner manager.

    lutris-wrapper: Blizzard Battle.net
    Started initial process 425647 from /nix/store/fnjd0h8ggg3hfifawhlcw4xp0yl0siv2-wine-ge-full-Proton8-8/bin/wine64 /home/jesse/Games/Diablo4/drive_c/Program Files (x86)/Battle.net/Battle.net Launcher.exe
    Start monitoring process.
    fsync: up and running.
    wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
    Initial process has exited (return code: 0)
    ntlm_auth: /home/jesse/.local/share/lutris/runtime/Ubuntu-18.04-x86_64/libjansson.so.4: no version information available (required by /nix/store/hcsh900c5zv7g7rfs54xa7iddlkn3c1z-samba-4.17.7/lib/samba/libcommon-auth-samba4.so)
    [last message repeats 8 more times]
    Monitored process exited.
    Exit with return code 0
    

    Perhaps this is a more specific problem than I realized.