I’m currently on Win11 but I’m getting that familiar Linux itch and want to dual boot a while again. I tend to gravitate towards Ubuntu simply because it’s so big and well supported by most things.
I’ve run Arch in the past but I’ve gotten too old and lazy for that if I’d be completely honest. I have played with manjaro and endeavour though… and opensuse tumbleweed, rolling is kind of nice.
Not sure what I’d try out first this time so I figured I’d get some inspiration from you guys!
I’ve been evaluating NixOS to make sure I can run games on it. I’ve only tried a machine with Intel graphics so far, but I see that AMD and Nvidia drivers are packaged. It seems convenient now that I’ve figured out the setup.
Vulkan is set up out of the box.
It’s necessary to enable 32-bit DRI support by adding this line to /etc/nix/configuration.nix
:
hardware.opengl.driSupport32Bit = true;
To use Lutris install the package and use its UI to install runners. I didn’t have to configure any extra libraries to get Battle.net running. You can configure the “system wine” that Lutris sees, and extra libraries your games might need like this:
home.packages = with pkgs; [
(lutris.override {
extraLibraries = pkgs: [
# List library dependencies here
];
extraPkgs = pkgs: [
wine-staging
];
})
];
Those lines go in a Home Manager config file, like ~/.config/home-manager/home.nix
. That installs Lutris, and any listed dependencies at the same time.
NixOS does not put dependencies in the file paths where programs usually look for them. That traditional directory structure is called the Filesystem Hierarchy Standard, or FHS. But Nix packages can create a virtual FHS where needed, and that is what the Lutris package does. That lets software that isn’t built for Nix work, like Lutris’ Wine runners. That means that for games to access libraries those libraries must be listed in that extraLibraries
option so that they are included in the FHS.
32-bit libraries are in pkgs.pkgsi686Linux.*
if you need them.
I haven’t tried Steam yet, but I think it has an option similar to the extraLibraries
one for Lutris.
A nice feature of NixOS is that if you add a bunch of libraries to your config trying to get a game to work, those libraries are automatically unlinked when you remove them from your config so your system stays nice and tidy.
Which packages do you add to extraLibraries? How do you find the dependencies? I’m struggling with this at the moment.
It depends on what your games need. I haven’t added any libraries yet, but I haven’t tested many games yet either. If something isn’t working you might be able to determine a missing library from the log output. In Lutris the Play button has an arrow on it that you can click on to find the “Show log output” button.
I’ve been having a great time with games on NixOS. Steam just works when you enable it. I believe you can specify extra libraries for the filesystem hierarchy hackery, but I haven’t needed to yet. One thing you should know about (if you don’t already) is steam-run
which is a simple command line tool that automatically wraps things in a normal FHS. Super convenient for the occasional binary :).
Good to know, thanks! Do you find steam-run to be helpful even for non-steam binaries that need an FHS? Or do you use it mainly for games?
Yeah, exactly! For steam
itself on NixOS you don’t have to manually use steam-run
, but steam-run
is a handy little tool to wrap / run other commands with the FHS that NixOS sets up for steam. I’ve mostly used it to run a few Linux games that I have binaries for, but don’t have on steam… I’m pretty sure I used it for another Linux program too, but I can’t remember what right now.
32-bit libraries are in
pkgs.pkgsi686Linux.*
if you need them.
Put the libraries into extraLibraries
; it’ll add them for both µarches. No need to explicitly use pkgsi686Linux
yourself.