Running unpackaged software

This chapter guides you through a number of ways in which you can run software that isn't packaged for NixOS (yet), including proprietary and custom software and games that likely never will be packaged.

Introduction

NixOS is very strict in its approach to system purity; there is essentially no global environment, and this also means that a lot of assumptions about what a 'standard Linux system' looks like, do not hold up when you are using NixOS. This is a common cause of problems, when people try to run software on NixOS that was not specifically packaged for it.

In this chapter, we'll go through a few ways in which you can deal with this situation, depending on what format your software is available in.

Running an AppImage

If you try to run an AppImage with the usual ./application-name invocation, you'll find that they won't run. This is because the AppImage runtime expects some files to exist in a global location that NixOS doesn't put there.

In practice, this is usually not a problem - in most cases, you can use appimage-run to run an AppImage on NixOS. appimage-run is a tool that creates a virtual environment with all the stuff that an AppImage expects to be there, and then runs it within that environment for you.

To run an AppImage called application-name, you should ensure that appimage-run is installed into your environment (eg. by adding it to your systemPackages), and then run:

appimage-run ./application-name

In some cases, this doesn't work either. That usually happens when the AppImage expects some additional library to exist on the system, but the appimage-run environment doesn't have it. On most Linux distributions, this would be fixed by installing the library it wants, but on NixOS that's a little more complicated. This guide doesn't currently cover that case (yet), and for now I would recommend to try another approach in this chapter instead.