Skip to content

NixOS Additions/Changes#14

Draft
CanvasofSpores wants to merge 2 commits intoMadByteDE:mainfrom
CanvasofSpores:SPTv4-Dev
Draft

NixOS Additions/Changes#14
CanvasofSpores wants to merge 2 commits intoMadByteDE:mainfrom
CanvasofSpores:SPTv4-Dev

Conversation

@CanvasofSpores
Copy link
Copy Markdown

@CanvasofSpores CanvasofSpores commented Oct 12, 2025

Additions to docs for installation on NixOS. it seems that there are a few things that'll need to be done differently. Testing/exploration in progress. Documenting as I go.

@CanvasofSpores CanvasofSpores changed the title NixOS Additions/Changes (WIP) NixOS Additions/Changes Oct 12, 2025
@CanvasofSpores
Copy link
Copy Markdown
Author

So, after a whole bunch of digging this evening, It seems that I may end up having to write up a proper nix package for SPT in order to use the new script. I'll be looking into this more tomorrow. I'm pretty sure that the spt-additions lutris script should work in the mean time, though, as I've seen that it's worked on NixOS for others.

@matt-harp
Copy link
Copy Markdown

Should this also include something like

environment.sessionVariables = {
  DOTNET_ROOT = "${pkgs.dotnet-aspnetcore_9}/share/dotnet/";
};

I had to define that, but now I have it working with no other special workarounds

@MadByteDE
Copy link
Copy Markdown
Owner

I'm open to merging this PR if someone can confirm that the changes of the PR + the suggestion by @matt-harp is all that is needed to get it working on nixOS. 👍

@CanvasofSpores
Copy link
Copy Markdown
Author

CanvasofSpores commented Oct 27, 2025

I've actually moved back to arch in the time since this draft PR was created due to ongoing personal frustrations with the OS that this had brought my attention to so, I'm currently unable to test.

That being said, if you can confirm that there weren't any other necessary steps that you needed @matt-harp, I'm more than happy to take care of adding that to the PR myself.

@matt-harp
Copy link
Copy Markdown

Here are the steps I had to take to get this working on NixOS:

  1. Ensure the system has something like this:
environment.sessionVariables = {
  DOTNET_ROOT = "${pkgs.dotnet-aspnetcore_9}/share/dotnet/";
};

Without this you'll see "You must install .NET to run this application." if you try to run the server.
2. In the Lutris configuration of SPTarkov - Launcher, disable System options > Pre-launch script
3. Add a native game to Lutris pointing to SPTarkov/SPT/SPT.Server.Linux using CLI mode, or to SPTarkov/launch-server.sh to use your local terminal emulator.

Trying to run it using the launch script under wine wouldn't work on my setup, plus splitting them into server and client is preferable for me anyway.

@CanvasofSpores
Copy link
Copy Markdown
Author

CanvasofSpores commented Oct 27, 2025

Gotcha, so this was using the lutris-additions script? any chance you could try using the new install script that doesn't use lutris? I have an extra drive and could go about reinstalling a nixos on that to attempt, but that may not be for a few days.

I hadn't realized that aspnet9 would be necessary for the lutris install

@MadByteDE
Copy link
Copy Markdown
Owner

Currently trying to install on nixos, can someone help me with this:
image

Did you have the same issue?
Seems related to this: NixOS/nixpkgs#285642

@CanvasofSpores
Copy link
Copy Markdown
Author

CanvasofSpores commented Nov 7, 2025

yeah, so the dynamically linked executable part is due to NixOS not being FHS compliant, and umu's pressure-vessel is trying to read some library that's normally in /lib or something like that. NixOS stores that stuff in /nix/store/, and almost all applications are containerized in a way that declares all of the dependencies and libraries they need and reference them that way. That was the difficult part.

Personally, my way of solving this was by using steam-run which uses steam's FHS environment.

The 'proper' way to handle this would be to properly package up the program as a nix package, I'd imagine. That's just a lot.

@MadByteDE
Copy link
Copy Markdown
Owner

yeah, so the dynamically linked executable part is due to NixOS not being FHS compliant, and umu's pressure-vessel is trying to read some library that's normally in /lib or something like that. NixOS stores that stuff in /nix/store/, and almost all applications are containerized in a way that declares all of the dependencies and libraries they need and reference them that way. That was the difficult part.

Personally, my way of solving this was by using steam-run which uses steam's FHS environment.

The 'proper' way to handle this would be to properly package up the program as a nix package, I'd imagine. That's just a lot.

Thanks! I slowly start to grasp the magnitude of this whole NixOS is not FHS compliant situation 😢

@MadByteDE MadByteDE added enhancement New feature or request help wanted Extra attention is needed labels Nov 21, 2025
@ReStranger
Copy link
Copy Markdown

You can just put everything in fhs env

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants