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?
For the PaperWM fans, this is a dedicated WM based on the same idea