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?
I think you can mount an ISO image under your running system and make changes. I found a couple of guides that might be helpful:
How to Mount an ISO File on Linux
Edit and repack .iso bootable image
I haven't done this before, but I think you can
chroot
into the mount directory, and run package manager commands in the mounted image to install another package.Or I have an alternative suggestion that might or might not be easier. I've been hearing a lot about immutable/atomic distros, and people designing their own images. You could make your own ublue image, for example, with whatever you want on it.
A promising looking starting point is github:ublue-os/startingpoint. Ignore the "Installation" instructions, and follow the "ISO" instructions instead.
Or I saw recently an announcement of a new way to build atomic images that is supposed to be easier than ever, BlueBuild